|
Have u considered using the Timer class?
eg
Timer myTimer = new Timer();
myTimer.Elapsed += new ElapsedEventHandler( DisplayTimeEvent );
myTimer.Interval = 1000;
myTimer.Start();
'do stuff
and the function that has been defined above can be coded like this
public static void DisplayTimeEvent( object source, ElapsedEventArgs e )
{
Console.Write("\r{0}", DateTime.Now);
}
Now Im thinking a infinite loop but not sure how you track mouse movements or keypresses
|
|
Expert:
|
nidhi
|
|
Date:
|
May 01, 2007
|
|
Time:
|
11:32
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
r u using windowsforms? I think there is a mousemove event u can capture - cant remember
But I got this link which may help you capture mouse movements, so that u can come out the loop that u have after your timer definiton, hope this helps http://www.codeproject.com/csharp/Global...
|
|
Expert:
|
nidhi
|
|
Date:
|
May 01, 2007
|
|
Time:
|
11:35
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
|
|
Expert:
|
PeterNZ
|
|
Date:
|
May 01, 2007
|
|
Time:
|
15:17
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
thanks and sorry for not getting back to this before.
Peter, your solution was the one I was looking for...
|
|
Expert:
|
dustPuppy
|
|
Date:
|
Jun 04, 2007
|
|
Time:
|
01:37
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
You can use the following to make the system to sleep for certain time
Threading.Thread.Sleep(Time)
here time is in milli seconds
If you want some thing like implementing progress bar while retrieving data let me know
- Rajavardhan Sarkapally
|
|
Expert:
|
sarkapally1
|
|
Date:
|
Nov 19, 2007
|
|
Time:
|
17:27
|
|
|
|
Votes: Good (0) | Bad (0) Login to rate this answer
|
|
|
|
|
|
|
This question has been answered, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for this question by clicking on the "Answer Summaries" Tab.
|
|