น่าจะลองดูอันนี้ เพราะมันตรวจสอบการ connect ลองเพิ่มโค้ดให้มัน disable control ในส่วนนี้ดู
helper.vb
Sub ChCon(ByVal newState As Int32)
'BetCon(connState & " vs " & newState)
Static lastline As String
Dim newline As String
If connState <> newState Then
If connState = 0 And newState = 1 Then
newline = ("Attempting to connect")
End If
If newState = 2 Then
newline = ("Connected!")
End If
If newState = 2 And connState = 3 Then
newline = ("Connection resumed!")
End If
If newState = 3 Then
newline = ("Connection interupted...")
' inSeq = 1
' outSeq = 0
End If
connState = newState
End If
If newline <> lastline And newline <> "" Then
BetCon(clientID & "-" & newline)
lastline = newline
End If
End Sub