|
Try this (or some other integer type - i.e. double, long, etc...)
int64 powerValue=int64(pow(base,power))
this tells the compiler that you want to use the old version of pow and not the new one with complex numbers
|
|
|
|
|
How can I make my application go in fullscreen mode using only windows forms (no directx)?
I want to make a game where menu/options/new game/etc. screens would be done in windows forms (c#) and the very game would be in C++/DirectX therefore I need the menu, etc. to be fullscreen to look exactly as the following DirectX game...
Can anyone tell me how to make fullscreen form in c#, please?
======
Adam 'Psyho' Pohorecki
|
|
|
|
|
psyho wrote:
Can anyone tell me how to make fullscreen form in c#, please?
Handle your form's Load event and insert the code something along the lines of:
this.FormBorderStyle = FormBorderStyle.None;
this.Location = new Point(0, 0);
this.Size = new Size(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height);
See if this is what you are looking for. Good luck on your game!
Happy Programming and may God Bless!
"Your coding practices might be buggy, but your code is always right."
Internet::WWW::CodeProject::bneacetp
N-Tech Productions
http://www.n-tp.com/
|
|
|
|
|
I'll add a
this.TopMost=true;
for bringing the window on the topmost surface to get rid of the taskbar.
Happy game-coding !
Michael CARBENAY
http://michael.carbenay.name
|
|
|
|
|
Hi
i am using some marcros in Excel.
My problem is that i am down loading this Excel document from an Asp.Net application,
while downloading Excel the marcros are not running. i want the marcro should be run.
can anybody help.
|
|
|
|
|
How can I send fax in .NET?
|
|
|
|
|
Hi,
For programming pocketpc(.net compact framework) in C#, do I need to
buy the whole Visual studio .net package or just buy the C#.net package ?
There is a great price difference between the two. Have anyone just buy
C#.net and able to use it to program smart device in .net CF ?
Thanks
|
|
|
|
|
Actually, you can use just VS C#, The installation should include the CF bits of the .NET Framework.
If you wait a bit, there's an even more compact version of the IDE coming soon: Visual C# 2005 Express Edition.
Ian Mariano - Bliki | Blog
"We are all wave equations in the information matrix of the universe" - me
|
|
|
|
|
I've created one DLL using Visual Studio .NET and that needs to be deployed in client's machines (there are around 50 clients).
What are the components client's has to install to run this DLL.
1. .NET redistribution package
2. .NET SDK (do I need this?)
I wanna know is there any pricing for using these components.
Also, I'm using RegAsm.exe from redistribution package and Gacutil.exe from .NET SDK before I can use that DLL on any client machine.
I'm not sure whether this procedure is correct or not.
or Please somebody let me know how can I install and use the .NET DLL.
JMC
|
|
|
|
|
You'll need to deploy only the .net redistribution package, and that should be ok.
If you're not familiar with the .net tools, I suggest that you use a MSI to deploy your package, you'll be able to build it with a deployment project in VS.net. (Building a simple msi is all gui-based so it's easier)
Michael CARBENAY
http://michael.carbenay.name
|
|
|
|
|
U need .net redistribution package installed on the client.
For application deployment u can also use "NO TOUCH DEPLOYMENT". Create a virtual directory in IIS and xcopy
ur executable. The client can run the exe from his IE.
ex: http://<server>/<virtual directory>/app.exe
The client must have the required security permissions.
cool man
|
|
|
|
|
I need to get a value from a SOAP xml that was serialized from an object model.
However, instead of deserializing the xml into the object model, I need to get access to the value without referencing the origional object classes.
The main reason for this is that over time the object model may change and therefore so will the SOAP compatibility, also, the SOAP xml file may come from different sources and managing and referencing all the different classes would be much more complicated than managing say an xpath call or deserializing into a generic object model.
Any help would be much appreciated
Thanks
Robin
|
|
|
|
|
I am using MSO2003 to send mail through an application. I can get it to open a MS Word mail item in an MS Word screen and send without a problem... The issue is - it leaves a copy of Outlook.exe and Winword.exe running.
What event should I hook into to close and destroy these programs? I can't do it in a finally block because it closes immediately when I do that. Is there a MailItem.OnClose() event? I can't find any useful event handlers.
I've tried using "wordDoc.MailEnvelope.EnvelopeHide" for the close event, and pretty much all the other events in the namespace. Nothing fires.
modified 30-Aug-22 21:01pm.
|
|
|
|
|
Have you tried
wordDoc = Nothing
wordApp = Nothing
|
|
|
|
|
yes
modified 30-Aug-22 21:01pm.
|
|
|
|
|
Hi to all...
I have a situation where different combinations of event-handlers must be assigned on-the-fly to the Click event of button control.
For example, "button1.click" might need to run "eventHandlerA" and/or "eventHandlerB" and/or "eventHandlerC".
It is easy to assign/de-assign them with "this.myButton.click += new System.EventHandler(eventHandlerX)" and "this.myButton.click -= new System.EventHandler(eventHandlerX)", but I'd like to be able to know which event handlers are active at any given time (and in which order), i.e. something like "foreach (eventHandler in this.myButton.click.eventHandlers) {get the name of the function handling the event}".
In other words, is it possible to enumerate, at run time, the event handlers associated with a given event?
Thanks to all...
JPeraita
|
|
|
|
|
You can do it from inside the class that declared the event, but not from other classes.
The reason is that inside the declaring class, the event is simply a delegate , so you just call its GetInvocationList method to get a list of "subscribers".
However, the event keyword exists partly so you can't do this. Otherwise, any code could get a list of delegates for a certain event and invoke them (whether or not the event in question actually occurred), thereby taking control from the class that delcared the event in the first place.
In your case, you could derive from Button and expose a property that returns all the subscribers to the click event.
Charlie
if(!curlies){ return; }
|
|
|
|
|
A colleague of mine is using Office 2003, installed form a different CD than my Office 2003. We built our solution on his machine this week since my machine was acting up and I need to re-install Windows. The build wouldn't work when building on his machine since it seems like his Office.dll and my Office.dll are two different things! Did MS change the interface between the two minor version changes? He is running a SLIGHTLY older version of Office 2003.
Just want to know if anyone else has had this issue? And if possible - a resolution. I am desperate since our client is not in the best of moods because of this.
modified 30-Aug-22 21:01pm.
|
|
|
|
|
Now we have another problem. When we deploy to our client, the program fails to create a type initializer (whatever that may mean coming from an exception) and dies. The client has MSO2003 installed on their machines and all the dependencies have been copied into their build directory.
What could the cause of this be? The client is very annoyed at the fact that "our" software doesn't work.
modified 30-Aug-22 21:01pm.
|
|
|
|
|
I often find code like this just above a class,sub ,function, property, etc..
I would like to learn what this is used for how do i know what to put here and why? These are just an example but I have seen different code here
<br />
<LocalisableDescription("BlendFill.StartColour"), <br />
Category("Appearance")><br />
<br />
<Editor(GetType(VBPowerPack.Design.BlendFillEditor), GetType(System.Drawing.Design.UITypeEditor)), <br />
TypeConverter(GetType(VBPowerPack.BlendFillTypeConverter)), <br />
Serializable()> _<br />
<br />
<System.Diagnostics.DebuggerNonUserCode()>
Thanks
|
|
|
|
|
|
I created a simple user control in C# which has a button in it.
//DemoControl.cs
namespace DemoControl
{
public class UserControl1 : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Button button1;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public UserControl1()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitComponent call
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 16);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(88, 32);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// UserControl1
//
this.Controls.Add(this.button1);
this.Name = "UserControl1";
this.Size = new System.Drawing.Size(608, 248);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.UserControl1_MouseMove);
this.ResumeLayout(false);
}
#endregion
}
}
The i created an MFC ActiveX control to host the C# control
//HostCtrol.cpp
int CMfcHostCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
AfxEnableControlContainer();
DemoControl::UserControl1* pcal = new DemoControl::UserControl1();
CComPtr<iunknown> spunkControl;
spunkControl.Attach((IUnknown*)System::Runtime::InteropServices::Marshal::GetIUnknownForObject(pcal).ToPointer());
CRect rectPlaceHolder;
GetClientRect( &rectPlaceHolder );
m_ctrl.Create(spunkControl, WS_VISIBLE | WS_TABSTOP, rectPlaceHolder, this, 0);
return 0;
}
where m_ctrl is CWinFormsControlWnd class which i downloaded from the MSDN Magazine at http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx
It works great, but the hosting application stuck when i press the button.
Does anyone knwos whats wrong?
Amir.
Amir Harel
|
|
|
|
|
Hiya I have a script that I want run when installing my app. This scripts adds my database table.
How do I do this??
Thanks.
|
|
|
|
|
Hi All
Ive written a portal mobile portal in vb.net that I want to secure to only authenticated users. I am having great difficulty doing this, as when I test in the nokia wap simulator 4.0 (most of the users will have nokia browsers) I cant seem to store any state.
When I authenticate the user, NMB 4.0 doesnt reflect the persisted information. THe web config file is set to not use cookies and the state is persisted if I test it with a an actual nokia 6230(GPRS), the open wave simulator and also normal IE browser. Any Help is appreciated.
(details of the authentication Im using is below):
Dim username As String = "RyanMalone"
FormsAuthentication.Initialize()
Dim strRole As String = AssignRoles(username)
'The AddMinutes determines how long the user will be logged in after leaving
'the site if he doesn't log off.
Dim fat As FormsAuthenticationTicket = New FormsAuthenticationTicket(1, _
username.ToString, DateTime.Now, _
DateTime.Now.AddMinutes(1), False, strRole, _
FormsAuthentication.FormsCookiePath)
Response.Cookies.Add(New HttpCookie(FormsAuthentication.FormsCookieName, _
FormsAuthentication.Encrypt(fat)))
Session("Telco") = "Optus"
|
|
|
|
|
Hello people,
My company has a set of COM components that all have the same interface, so we use CATID's to allow the user to select which component to use.
I have succesfully wrapped one of our components ina .NET wrapper using the MS tools, and it works fine from C# etc. However, I cannot find a .NET equivilent of the CATID mechanism to categorise a set of comnponents with the same I/F.
Can anyone point me in the right direction? I know there is a recent article of actually using CATID in .NET, but I was wondering what the .NET systme would use natively.
TIA
JamesH
|
|
|
|