learned/learning/to learn RSS 2.0
# Thursday, November 12, 2009

This program prevents your system from getting locked even if it is left idle for time greater than your screen saver time. It basically presses ‘down’ arrow key every minute.


Create a Windows Forms Application and add a timer to the form.


public Form1()






private void StartAction()


    // the timer is started and the form is minimized

    // set the timer interval as per your needs. I have set it to be 60000 milliseconds = 1 min

    timer_keypress.Enabled = true;

    this.WindowState = FormWindowState.Minimized;

    this.ShowInTaskbar = false;




To add the application to your system tray when minimized, add a notify icon from your toolbox to the forms and set properties appropriately. I chose an icon and changed the text property. By default this form will be in minimized state, as I have added code to do so in my StartAction function.


Add context menu from your toolbox to show menu when the system tray icon is right clicked. Right click contextMenuStrip and choose Edit items to add your menu items. Double click on the menu item to add a handler. I’ve added ‘Exit’ menu. Set your notify icon’s contextmenustrip property.


private void exitToolStripMenuItem_Click(object sender, EventArgs e)





private void StopAction()


    // the timer is stopped and the form is closed  

    timer_keypress.Enabled = false;




// this event will be triggered every minute

private void timer_keypress_Tick(object sender, EventArgs e)





There are many ways to do this, I found this one to be easy.

Here is the fileKeyPress.exe (889 KB)
Thursday, November 12, 2009 10:52:51 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Comments are closed.
<May 2020>
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2020
Sign In
Total Posts: 41
This Year: 0
This Month: 0
This Week: 0
Comments: 47
Pick a theme:
All Content © 2020, Gokulnath
DasBlog theme 'Business' created by Christoph De Baene (delarou)
The new movement has made a number of changes. First, precise instantaneous jump calendar display tag heuer replica large switching time is scheduled for midnight. The power required for this process will slowly build up within hours. Furthermore, LANGE 1 escapement now available eccentric balance weight balance wheel and homemade free omega uk watch sprung. Means provided in the hand-carved balance wheel splint omega replica underneath, 21,600 vibrations per hour. This table also hublot replica retains the reliable double-barrel, power reserve of 72 hours.