[Tutor] (no subject)

Tim Golden Tim.Golden at viacom-outdoor.co.uk
Fri Nov 24 11:04:45 CET 2006


[Gardner, Dean]

| I was wondering if anyone knew how to control the desktop 
| resolution via python. I have investigated pygame which seems 
| to allow you acces to video settings but it appears to only 
| influence a window rather than the system (I may be totally 
| wrong about this though)
| 
| What I ideally need is a small app that will swap resolution 
| between 1600*1200 and 1280*1024 

I haven't tried it, but a bit of poking around suggests
that you want to look at the ChangeDisplaySettingsEx
API call, exposed by pywin32 (or via ctypes if you prefer).
That in turn will probably mean learning the all-embracing
DEVMODE structure, and things like Display Devices.

Should be possible with a bit of experimentation, for which
I'm afraid I don't have time at the moment.

With this kind of question, it's almost always worth looking
around the MS newgroups and Delphi forums. Someone's bound
to have asked the question already; it's just a question of
translating the answer into Python!

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


More information about the Tutor mailing list