tim8w
September 1st, 2009, 05:49 PM
I'm not sure exactly how to describe this. In VB6, there was a Timer command. I could create a variable of type Timer and loop until the current value for Timer exceeded the initial plus a given amount of time. This allowed me to update form variables while the timing loop was executing. How can I do something similar in .NET?
Here is a sample of the VB6 code:
Dim StartTimer As Double
StartTimer = Timer
Do
Call Sleep(100)
txtFinalRefValue.Text = DVMread(SystemSetup.RefChannel)
Loop While (Timer < (StartTimer + LeakTestTime)) And DoEvents()
Here is a sample of the VB6 code:
Dim StartTimer As Double
StartTimer = Timer
Do
Call Sleep(100)
txtFinalRefValue.Text = DVMread(SystemSetup.RefChannel)
Loop While (Timer < (StartTimer + LeakTestTime)) And DoEvents()