Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I trick the screensaver in code?

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
Hi
How can I stop a network screensaver from activating by a command in code. My network forces a screen saver after 30 minutes if I dont key something in and I have to re-log in to continue - a real pain!
Example application: Can I send something to a keyboard buffer or an API or something to foll it into thinking I'm at my keyboard typing away when in reality I'm shagging the boss's secretary on the boardroom carpet?
Dripping with anticipation,
Ted
 
The VB purists will blow a vein in their collective forehead when they see this. I have to confess that I shiver with revulsion as I type it....

Place a timer control on a form and set the interval to a suitable value. Then:
Code:
Private Sub Timer1_Timer()
SendKeys "{CAPSLOCK}{CAPSLOCK}", True
End Sub
There is probably no harm in using a timer for this purpose, as long as you only intend to activate it when you leave your computer for a few minutes. The real harm comes from trying to outsmart system policies. Your administrator obviously had something in mind when he decided to enforce a 30 minute screensaver rule. Perhaps it was to prevent your coworkers from viewing/modifying your work while you are in conference with your secretary.

Perhaps it was enforced to keep your mind on productive endeavors. One can only guess.


VCA.gif
 
Thanks I'll try it although I don't know if the boss's secretary will thank you or not! (it reduces her list of excuses)
Actually it is for a security reason to reduce the possibility of unauthorised persons getting into the local email network. A normal screensaver should be enough.
I suspect there is a deeper level of keyboard control involved.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top