Code:
Public Sub Form1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
Dim conn As Integer
If conn = 1 Then
Stop
ElseIf conn <> 1 Then
conn = 1
Threading.Thread.Sleep(3000)
Label3.Text = "Connected"
Label3.ForeColor = Color.Green
End If
End Sub
Every time a re-hover the mouse, it still puts the form to sleep for three seconds. can anyone help?
Edit: I did a different code. This one only works one time though. then decides to STOP WORKING!
Code:
Public Sub Form1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseHover
Dim timeOut As DateTime = Now.AddMilliseconds(3000)
Do
Application.DoEvents()
Loop Until Now > timeOut
Label3.Text = "jnknoren"
End Sub
if anyone could fix my old code, it would be lovely