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!
Timer
Collapse
X
-
Tags: None
-
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.
Comment