Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1997-03-20
1
Medium Priority
?
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
mbecker011597 earned 200 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

715 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