[python-win32] Python und Hardwaremanagement

Daniel F nanotube at gmail.com
Thu Apr 14 18:00:58 CEST 2005


> Many thanks so far for your quick response. Basically what I mean with
> "manage your hardware" is writing a program that can switch on/off the
> monitor and keyboard as well as setting/change the resolution and frequency.
> Its just for training. 

to play with the monitor settings, check out the following api
functions in the msdn api reference:

changedisplaysettings
enumdisplaysettings

these are wrapped by pywin32, and will allow you to change resolution,
frequency, etc. (dont think you can turn monitor off through these,
but i may be wrong, i havent used these myself...)

as to the keyboard... i dont think you can "turn off" the keyboard,
but if you want to disable all keyboard input, you can just hook all
messages (use setwindowhookex api, or the pyHook module, which wraps
setwindowhookex and makes things more convenient), and block them.

-d


More information about the Python-win32 mailing list