View Full Version : Changing Screen resolution
lance
03-16-2004, 09:54 AM
Is there a possibility to be able to change the desktop screen resolution from what ever it is to 800x600. or what ever I like it to be. Must be done through autoplay 5
Thanks !!
Here's a link to a tool that will do the job for you.
ResMaster (http://www.icynorth.com/development/ResMaster_dll.html)
TJ_Tigger
03-16-2004, 11:22 AM
Pay attention to the red text on the page. If you search the forums you will find similar comments about changing a users screen for them and how it might be frowned upon.
Schmidl
04-14-2004, 06:17 AM
The description of the ResChanger.dll Worm mentioned, sounds good. But the example provided with that download is only for MS4 and can't be opened with v5.
Can someone please give me a MS5 example to see, how it works?
Thank you in advance!
Schmidl
yosik
04-12-2005, 02:41 AM
Brett,
Couldyou please explain how to use this DLL?
I checked on your site and see the parameters but don't understand how to use them in AMS (ver 5.0, of course).
Ideal would be:
get resolution on startup
change resolution (after getting user approval)
ghange back resolution on shutdown.
Thanks
Yossi
yosik
04-12-2005, 08:10 AM
Thanks Jim,
I got stuck using the functions with double parentheses instead of their name only...and I KNOW how to use function, I just copied and pasted from Brett's site...Shame on me...
Thanks again
Yossi
TJ_Tigger
04-12-2005, 08:54 AM
I just copied and pasted from Brett's site...Shame on me...
That one gets me all the time. :D
xarroyo
04-13-2005, 09:38 AM
Hi Everyone..
I'm new here, well.. I was checking what you have posted but i just want to change from any display resolution to 1024x768... What should i do or what should i change from the ResChanger that Jim upload..??? i hope you can help me...
Thanks,
Xavier Arroyo
longedge
04-14-2005, 05:31 AM
Try This :)
Hi Jim,
Have you succesfully implemented it in a project?
I've got a small proportion of users who run 800x600 and I want to temporarily set mode 1024,768,24,75. I am using this code in Project/Actions/OnStartup -
ResChanged=false
display = System.GetDisplayInfo();
if display.Width<1024 then
result = Dialog.Message("Screen Resolution Incompatible", "Your screen resolution must be set to 1024 x 768 or better before you can view this handbook.\r\n\r\nTo change your resolution click OK.\r\n\r\nWhen you exit from the handbook, your screen resolution will be reset to it\'s current value.\r\n\r\nClick Cancel if you do not wish to proceed.", MB_OKCANCEL, MB_ICONSTOP, MB_DEFBUTTON1);
if result == IDOK then
StartDisplayMode = DLL.CallFunction("AutoPlay\\Docs\\ResMaster.dll", "GetCurrentDisplayMode", "", DLL_RETURN_TYPE_STRING, DLL_CALL_CDECL);
TempMode="1024,768,24,75"
result = DLL.CallFunction("AutoPlay\\Docs\\ResMaster.dll", "SetDisplayMode", TempMode, DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
ResChanged=true
end
if result == IDCANCEL then
Application.Exit()
end
end
and this code in the Project/Actions/OnShutdown -
if ResChanged==true then
result = DLL.CallFunction("AutoPlay\\Docs\\ResMaster.dll", "SetDisplayMode", StartDisplayMode, DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
end
It almost works. The screen resolutions change as required BUT the project window appears as an 800x600 block in the upper right corner of the screen which has been changed to 1024x768. The return to 800x600 works.
Any thoughts?
I should add - I'm using kiosk mode.
My best guess is that you need to exit and restart your executable. Use File.Run to restart your program (don’t wait for return), then Application.Exit(0); to exit. When your project restarts at the correct resolution, I think it will be OK.
My biggest concern is that everybody’s computer monitor will support the settings you chose. 1024x768x24@75Hz may work fine on your monitor, but may be too fast for some cheaper (older) monitor/graphics cards.
My suggestion is that you make a list of possible settings:
1024,768,24,75
1024,768,24,70
1024,768,24,65
1024,768,24,60
1024,768,16 ,75
1024,768,16 ,70
1024,768,16 ,65
1024,768,16,60
Then search through your string StartDisplayMode to find the first one that exists, and use it for TempMode
result = String.Find(StartDisplayMode, "1024,768,24,75", 1, false);
.
longedge
04-14-2005, 08:04 AM
My biggest concern is that everybody’s computer monitor will support the settings you chose. 1024x768x24@75Hz may work fine on your monitor, but may be too fast for some cheaper (older) monitor/graphics cards.
Thanks Jim, I'll try your suggestion. I'm lucky in that I have a 'closed audience' and I know that 75Hz is the lowest common denominator and will work OK. Unfortunately I can't enforce a common permanent setting of 1024x768 - now that would be easy ;)
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.