PDA

View Full Version : chaging screen resolutions


hotspur1
05-02-2003, 08:27 AM
Is there a way to change screen resolution from within Vizard?

I am working in a scenario where I initially want to have higher res (probably SVGA or maybe XGA but when I call Vizard, I need to get resolution down to VGA so I can use my Kaiser HMD. I'd need to set the res back when I am done with my Vizard script.

Are there any calls or workarounds in Vizard for doing this?

Thanks
Andy

farshizzo
05-02-2003, 02:38 PM
Hi Andy,

There isn't any built in function to change the screen resolution within Vizard. However, if you know a little bit of windows programming, it would be very easy to create a Vizard plugin to accomplish this. Here's some windows code that will change the screen resolution to 800x600:

***************************
DEVMODE dmScreenSettings;
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
dmScreenSettings.dmSize=sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = 800;
dmScreenSettings.dmPelsHeight = 600;
dmScreenSettings.dmFields=DM_PELSWIDTH|DM_PELSHEIG HT;
ChangeDisplaySettings(&dmScreenSettings,0);
***************************

The following code will return you back to the original resolution:

***************************
ChangeDisplaySettings(NULL,0);
***************************

Good luck!

-- farshid