Haziq Wani
Location: Bombay
Languages:
Expertise
Disabling-the-Screen-Saver
Earlier in the times of windows xp, the method used to disable screensaver was to use a windows hook and monitor WM_SYSCOMMAND message. If the wParam of this message would be SC_SCREENSAVE, one would not let the message do anything. However, with the advent of Windows Vista and Windows 7, Microsoft says that screensaver will activate no matter what an application does to the SC_SCREENSAVE message. One way around this problem is to set a timer to a specified time out and then monitor the WM_TIMER messages. With each WM_TIMER message, a simulation of a key press event of a virtual key on keyboard can be made thus preventing the screensaver from activating. For the complete article, see my blog: http://pluscplus.blogspot.com/2011/12/disabling-screen-saver.html