Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program Hangs 1

Status
Not open for further replies.

007MCSE

IS-IT--Management
Jan 3, 2003
51
US
I've got a Program running and endless Loop With a do while events.

Private Sub Timer1_Timer()
Static Temp As Integer
Temp = Temp + 1
Do While DoEvents()
If Temp Mod 2 = 0 Then Exit Do
Loop
End Sub

When the program is running, if you move the form with the mouse. The program locks up.
I know its because of the Do While Do Events.

But how do I stop this happening?
 
Hi Cajun

That works great. I had the Loop while do events in the wrong place.

Thank you for all your help, its most appreciated.
Thanks again
Gary
 
Glad it worked out. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top