Maybe it's a game named "Punish the User."
I've heard this question asked many times. Without exception, I've found
that further investigation into the motivation behind such a request has
revealed inappropriate justification for doing so due to ignorance of
Windows standards and conventions. There's always a chance this could be
the rare exception, but I wouldn't bet on it.
The simple answer is the .NET doesn't directly support changing display
properties. You'll have to resort to GDI or DirectPlay API calls, as shown
by Herfried with the ChangeDisplaySettings GDI function.
Games shouldn't change the display properties in Windows, either. They
should typically use IDirectDraw::SetDisplayMode so that they can cooperate
in Windows with different resolution settings. I haven't heard of any
commercial mainstream/best selling games that use .NET, despite the typical
samples, proof-of-concepts and fringe stuff.
"Tom Spink" <th**********@ntlworld.com> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
Maybe he's creating a game.
--
HTH,
-- Tom Spink, Über Geek
Please respond to the newsgroup,
so all can benefit
"Jack Spry" <js***@nospammers.com> wrote in message
news:#k*************@TK2MSFTNGP09.phx.gbl...
"XenofeX" <xe*******@hotmail.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl... Thanks a lot
The question isn't whether you _can_ change the display properties of
the system, but whether you _should_ do so. Changing the display properties
is considered the sole responsibility of the users or administrators, not
that of applications. Generally, only video driver control panels should
allow this to be done, and they aren't .NET applications because manufacturers
can't depend on the framework being installed.
So why do you think that you want to do this?