Code: Select all
#SC_MONITORPOWER= $F170
#WM_SYSCOMMAND = $112
If InitKeyboard()=0
MessageRequester("Error", "Can't initialize Keyboard.", 0)
End
EndIf
OpenWindow(1,1,1,1,1,"",#PB_Window_Invisible)
SendMessage_(WindowID(1), #WM_SYSCOMMAND, #SC_MONITORPOWER,2 )
;WaitWindowEvent()
Repeat
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
SendMessage_(WindowID(1), #WM_SYSCOMMAND, #SC_MONITORPOWER,-1 )
It runs ok but as soon as I move the mouse it turn on the LCD. I only want it to turn on the LCD when a key is pressed, so how do I prevent the mouse or any other even apart from the keyboad from enabling the LCD?
Thanks in advance!