Solved

How to reset the system timeout screen saver progammatically (NT)?

Posted on 1997-03-20
1
239 Views
Last Modified: 2013-12-03
Hi all,
  Windows NT: Could anyone tell me how I can reset programmatically the system time-out that
controls the screen saver?
  I've written a application to communicate Windows and a serial keyboard.
I'm using the Win API Keybd_event(VK_Mykey,0,0,0) function to synthesize a keystroke, but although the
"keys" are sent to the applications, the system "ignores" these "keys" in order to activate
or deactivate the screen saver. I know how I can kill the screen saver, but so far I have not
been able to stop the screen saver timeout whenever I send one of my "keys" to Windows.
I would really appreciate any help. Many thanks in advance.
   
   Javier Campos
0
Comment
Question by:churri
1 Comment
 
LVL 1

Accepted Solution

by:
mbecker011597 earned 100 total points
ID: 1298687
To keep the screensaver from activating while your
application has focus do the following:

In your message loop, look for the WM_SYSCOMMAND
message with wParam==SC_SCREENSAVE and silently
ignore it (i.e. return). The screensaver only gets
activated if you pass this message to DefWndProc()

M.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now