Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the screen resolution from foxpro
Message
From
04/06/2007 04:20:56
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01230133
Message ID:
01230142
Views:
28
>Hello;
>
>I'd like to know if there is a way to change the screen resolution from within foxpro or writing a windows script. Any help will be greatly appreciated.
>
>Thanks in advance.
>
>Juan Urbina

While it's not conform with the concept of the windows concept, where a single application seldom rules over the screen, it's possible and needed in special cases like a kiosk mode etc. But even in that case you could set it as default screen resolution.

See Faq#7902 for reasons why not to do it and an alternative way of giving the user the chance to adjust the sreen settings themselves.

It's a WinAPI call ChangeDisplaySettings. It's a bit more complex than just setting the resolution. Sometimes a restart is needed, which is indicated by a return value of ChangeDisplaySettings and it's also recommended to inform all other application windows of the resolution change with SendMessage. Mike Gagnon has posted a very complete way of changing resolution here:

http://www.atoutfox.com/articles.asp?ACTION=FCONSULTER&ID=0000000263


Bye, Olaf.
Previous
Reply
Map
View

Click here to load this message in the networking platform