|
What are the 'commercial tools' you mention?
cb
|
|
|
|
|
I already provided links to two of the most well-known commerical tools for Windows Installer packages in this thread, sorted in order of my personal preference and cost (ISFWI is WAY too expensive and slow to support features unlike Wise).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Missed that, danm Evyln Woods!
Thanks,
cb
|
|
|
|
|
Gurmeet S. Kochar wrote:
\Documents and Settings\username\Application Data\Desktop
Actually, get rid of "Application Data" here. It's just \Documents and Settings\username\Desktop.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello everyone.
I'm new to C#, and not all that skilled in C++(only 1 semester). I am however decent in VB.
Anyway, I'm wondering if you could tell me how to, on startup, change the screen resolution and maximize my app fullscreen. My form is 1024x768 and I want it to fill the screen regardless of desktop reso.
This is just a simple game I am creating while learning the language a bit. This info would be greatly appreciated! Have a good day.
Acidon
|
|
|
|
|
Set the FormBorderStyle to None , and maximize your form. When you do this, all appbars, including the taskbar, get a notification that a full-screen app wants the whole screen, so they run and hide.
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
Hey, thanks for the reply.
I'm currently doing that. What I am wanting to do is actually change the resolution to 1024x768 while the game(app) is running, and then release it back to the desktop defined resolution upon exit.
This is just a simple project while i learn the language, but I would like to keep things simple in that respect and have it change to that reso when I load it. Any ideas, comments, suggestions and/or flames appreciated.
Thanks,
Acidon
|
|
|
|
|
|
Perfect. Thank you very much.
I did search for this type of info but never found anything. I obviously didn't use the right keywords. At any rate, I appreciate the reply. Take care,
Acidon
|
|
|
|
|
Hey
I am trying to make a simple 2d racing game, the wiev is like GTA.
I have som problem with the car handling. I am using this math right now,
double radians;
double tan;
radians = this.Rotation * (Math.PI/180);
tan = Math.Tan(radians);
Position.X = this.CarBox.Location.X + this.Speed;
Position.Y = this.CarBox.Location.Y + (int)(this.Speed * tan);
this.CarBox.Location = Position;
The speed is between 0-20 and the rotation is 0-360 degree.
The car is now driving forward, when im turning the car rotates like it shild and it moves in other direction, but if i turn to much toward 0 degree(UP) och 180(down) then it will flip and disipare from the screan, the y value is then somthing around -32000.
I have also notis that if i drive in around 45 degreee angle it will drive a bit faster hen if i drive forward(right).
Im not that good at math so i hope somone could help me with this.
Best regards
Jimmy
|
|
|
|
|
Snowjim wrote:
radians = this.Rotation * (Math.PI/180);
lol no, what are you doing here? Math.Pi is 180 deg in radians!
[edit] my bad, the code was just lookign a bit confusing, why are you using degrees at all?[edit]
|
|
|
|
|
Snowjim wrote:
tan = Math.Tan(radians);
Snowjim wrote:
The car is now driving forward, when im turning the car rotates like it shild and it moves in other direction, but if i turn to much toward 0 degree(UP) och 180(down) then it will flip and disipare from the screan, the y value is then somthing around -32000.
Thats what you get at the tan graph asimptotes. At pi intervals IIRC (i really should RC). Hence you can deduce that your angle plotting is not correct.
Rt2 = Rx2 + Ry2 , pythagoras. And the resultant (Rt) should be a factor of your time/speed variable.
plot it on a piece of paper and it should all make sense
|
|
|
|
|
What is the best way to specify a directory in an application. The last thing I want is for the application to crash if it is not installed in the directory that is hard coded. I have certain files that I need to read from to setup my App. How can I specify something like [ProgramFilesFolder] in my app to look there for the necessary file. I know this kind of thing is possible with Windows installer projects. What about the App... especially since I'm still writing in debug mode. Once I add the installer, the files will all be moved to a different directory.
thanks in advance
|
|
|
|
|
Use current directory, and make sure u set your apps working folder to that
|
|
|
|
|
Actually, a better way is to use the Application.StartupPath . The current working directory (which you can get using Environment.CurrentDirectory ) is not always the directory into which your application is installed. The Application.StartupPath is.
Also, you can use Environment.GetFolderPath with the various special folders defined in Environment.SpecialFolder to get the path of that folder as defined by the system. For example, while [ProgramFilesFolder] is a Windows Installer property for the "Program Files" older, you can use the Environment.SpecialFolder.ProgramFiles enum member to get the directory using Environment.GetFolderPath .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you... that was the answer I was looking for.
|
|
|
|
|
Hi!
I want to lock the mouse to my application with a key-combination. By lock I mean in a way that you can't move the mouse outside the window of my application. I want to unlock the mouse with the same key-combination (e.g. Ctrl+l).
Is that possible? Can anyone help he?
Thanks
Erik
|
|
|
|
|
Hi
you need to call ClipCursor API
BOOL ClipCursor(
CONST RECT *lpRect
);
check MSDN for more info.
|
|
|
|
|
i thought this was a big developer NO-NO!
|
|
|
|
|
Actually, just use the Cursor.Clip property already provided in the .NET FCL.
As far as being a no-no, just make sure you restore the clipping region (the desktop area) after you're done - even in case of error.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
Is there any C# equivalent for SDK function 'MsgWaitForMultipleObjects()'? I want to implement this following c++ code in c#. Which is the right path to follow.
bool CMyClass::MyFun()
{
unsigned threadID;
DWORD waitResult;
MSG msg;
writeSuccess = false;
hThread = (HANDLE)_beginthreadex(NULL, 0,writeThread, NULL,0,&threadID);
if (!hThread)
return false;
waitResult = MsgWaitForMultipleObjects(1, &hThread, FALSE, INFINITE, QS_ALLINPUT);
while (waitResult != WAIT_OBJECT_0)
{
if (waitResult == WAIT_OBJECT_0 + 1)
while (PeekMessage(&msg, NULL,0,0,PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
if (waitResult == WAIT_FAILED)
{
break;
}
waitResult = MsgWaitForMultipleObjects(1, &hThread, FALSE, INFINITE, QS_ALLINPUT);
}
CloseHandle(hThread);
hThread = NULL;
return writeSuccess;
}
I have read about the IMessageFilter interface of Microsoft.Win32 namespace. Is this the right way to proceed on this.
Kindly advise.
Vini
|
|
|
|
|
WaitHandle.WaitOne uses MsgWaitForMultipleObjects. I know this because when it is called on the UI thread messages are still pumped.
|
|
|
|
|
Hi All,
I want to access a web service(methods) from java at runtime.
what are the ways for doing this?
Any Links to some articles on this would be appreciated
Thanks and Regards
Tushar mahajan.
|
|
|
|
|
|