Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the screen resolution from foxpro
Message
De
04/06/2007 04:20:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01230133
Message ID:
01230142
Vues:
21
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform