I can get the current screen resolution from within a C# program by using
int nW = SystemInformation.PrimaryMonitorSize.Width;
int nH = SystemInformation.PrimaryMonitorSize.Height;
but how can I change the current screen resolution from within a C# program?
Why do I want to do this?
I have a computer game program that is written to neatly fill a 800 X 600 screen in full screen mode.
It looks wrong on other sizes of screen.
On program load I wish to check the current screen size setting, if it is not 800 X 600, store the current settings values and change the screen settings to 800 X 600.
When the user wishes to exit the program I want to reset the screen settings to what they were when we started.
Help!