Anybody have any code on how to change the screen resolution.

Posted on 2001-09-18 02:27:46 by mega
The following should be all you need to change the resolution

DM_BITSPERPEL = 00040000h
DM_PELSWIDTH = 00080000h
DM_PELSHEIGHT = 00100000h

LOCAL dmScreenSettings:DEVMODE

mov dmScreenSettings.dmSize, sizeof dmScreenSettings
mov dmScreenSettings.dmPelsWidth,1024
mov dmScreenSettings.dmPelsHeight,768
mov dmScreenSettings.dmBitsPerPel,32
mov dmScreenSettings.dmFields, DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT
invoke ChangeDisplaySettings, ADDR dmScreenSettings, CDS_FULLSCREEN

And this will change it back

invoke ChangeDisplaySettings, 0, 0

All based on code by scalp
Posted on 2001-09-18 06:50:43 by Eóin
Hi -

You can use the EnumDisplaySettings() and ChangeDisplaySettings() APIs for that. Check them out in MSDN .

Posted on 2001-09-18 06:53:42 by CalamityJake
thanks for your help guys... not long after i poster it i found what i was looking for...

i wanted a little program that stays in the taskbar and would let my quickly change the resolution, so if anyone is interested you can get it here, with the source code:
Posted on 2001-09-19 08:41:30 by mega