TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
roy doron
NA
33
20.5k
How to save time Interval before is ends?
Dec 18 2012 10:52 AM
Hello!
I have Form with a Timer1, and it set to 10Sec.
There is a KeyDown event - when the user press "Enter", I would like to save in "ans" the time duration that past in the 10S interval before it ends.
For Example: If i starting the timer1 now, and after 3Sec, I'm pressing Enter, ans = 3. and if I didnt press any key, ans will be equal to 10.
I have this code:
if (e.KeyCode == Keys.Enter)
{
ResponseTimeList.Add(timer1.Interval);
}
*ResponseTimeList is:
public List<double> ResponseTimeList = new List<double>();
How can i improve it?
Thanks.
Reply
Answers (
1
)
how to transfer file from local system to server in winform
How to search the text in WebBrowser Control