469,330 Members | 1,288 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.


I am using Visual Basic to make a program for a psychology experiment and I would like to time how long participants stay on particular forms. Does anyone know how to do this? I used the timer on other forms to limit the amount of time participants can stay on one form but now I would like a timer to start when the form loads, end when the participant clicks on the next button and write the amount of time they spent on the form in a text file. Any help is appreciated!
Oct 28 '11 #1
1 893
8,435 Expert 8TB
It depends a bit on whether you're loading and unloading the form, or just showing and hiding it.

You could make a note of the current time in the form's Load or Activate event. Then, when you hide or unload and move to the next form, subtract that from the current time to determine how long they spent there. The DateDiff function is handy for this.
Dec 18 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by John David Thornton | last post: by
12 posts views Thread by Gina_Marano | last post: by
8 posts views Thread by =?Utf-8?B?RGF2ZSBCb29rZXI=?= | last post: by
11 posts views Thread by Hotrod2000 | last post: by
11 posts views Thread by Anil Gupte/iCinema.com | last post: by
3 posts views Thread by Steve | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.