473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Detect Keystoke in c# windows application

Hi,
I want to detect the keystroke entered by the user in my
application. Actually the scenarion is, at first the user is entering
some details to the windows form, later on he is idle for few minutes
..That time there is no keystroke detected to my form.If there is no
keystroke detected for more than 10 minutes then i have to close the
form.how to incorporate this., any suggestions.

Thanks in advance
Josh
Nov 15 '05 #1
1 1897
Hi Josh,

You could add a KeyPressed handler to the form , you will also need a
timer, the idea is to reset the timer each time a keystroke is received, you
could call Stop() and later Start() on the timer or use Enabled instead ,
this will reset the timer to 10 min after the last keystroke, then if the
timer handler is ever called you will know that 10 minutes passed without a
KeyPress.
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Josh" <t-*********@chn.cognizant.com> wrote in message
news:40**************************@posting.google.c om...
Hi,
I want to detect the keystroke entered by the user in my
application. Actually the scenarion is, at first the user is entering
some details to the windows form, later on he is idle for few minutes
.That time there is no keystroke detected to my form.If there is no
keystroke detected for more than 10 minutes then i have to close the
form.how to incorporate this., any suggestions.

Thanks in advance
Josh

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
2
by: Mike Stephens | last post by:
I have an application to minimizes when X is clicked. If the user wants to close the application they click the Exit Application button.This works fine and does exactly what I need. I have since...
12
by: Patrick Dugan | last post by:
I have an vb.net application that is a module that uses a "application.run" in the sub main to start. There is no form involved (just a system tray icon) How can you detect when the application...
0
by: =?Utf-8?B?am1hZ2FyYW0=?= | last post by:
My program needs to do X when someone 'starts using' their Windows user account, and it should do Y when they 'stop using' their Windows user account. By 'starts using' I mean they log on, unlock...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.