Forcing a video mode

Is it possible to force a video mode ( eg 640x480 x 16 color)  from a Delphi program, rather than having to deal with various resolutions?
If so, how is it done.  

I'm just beginning in Delphi!

Thank you
PeterO121799Asked:
Who is Participating?
 
edeyConnect With a Mentor Commented:
You can, see the ChangeDisplaySettings function in the win32.hlp:


"The ChangeDisplaySettings function changes the display settings to the specified graphics mode.

LONG ChangeDisplaySettings(

    LPDEVMODE  lpDevMode,      
    DWORD  dwflags      
   );      "

It should be noted, though, that this is particularily "bad form", and should be avoided.


GL
Mike
0
 
PeterO121799Author Commented:
Edited text of question.
0
 
MadshiCommented:
Yep, I agree with Mike, your customers will definitely not like it, when you change the video mode - except you're running in fullscreen, like a game... But then you should use DirectX, there are functions available to switch to a different mode in DirectX full screen mode. And DirectX automatically restores the old resolution when the fullscreen mode is ended.

Regards, Madshi.
0
 
PeterO121799Author Commented:
Thank you for your advice, noted, and will read up on it!
0
 
edeyCommented:
Glad to be of service :)

GL
Mike
0
All Courses

From novice to tech pro — start learning today.