Smarty,
I had to check my PH triggers.
Hallway motion detector 'on' wakes up display (instead of sending 'space' I actually use PowerHome to run an AutoIt script on the Fujitsu for educational reasons).
Hallway motion detector 'off' minimizes XLobby, so that the aquarium is visible on the next wake-up. I use RocketDock with an always on top setting to maximize Xlobby when needed.
I actually use the windows screensaver /monitor power/powersettings functionality to put the screen to sleep.
It seemed simpler at the time.
I found the following commands on the web:
To turn off:
SendMessage hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal 2&
To turn into energy-saving mode:
SendMessage hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal 1&
To turn on:
SendMessage hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal -1&
As hWnd you may use handle of any window, for example, Form.hWnd.
Constants:
Const WM_SYSCOMMAND = &H112&
Const SC_MONITORPOWER = &HF170&
If these don't work there's command line freeware out there that does:
http://display.noel-danjou.qarchive.org/
http://www.nirsoft.net/utils/nircmd.html
HTH,
Manny
PS. let me know what you end up doing in my thread (so as to not hijack this one).
http://www.xlobby.com/forum/viewtopic.php?t=5019