Option Explicit
Private ErrorString As String
Private r As Long
Private Sub chkNotify_Click()
picNotify.BackColor = Me.BackColor
If chkNotify.Value = 1 Then
SubClass picNotify.hWnd
Else
UnSubClass picNotify.hWnd
End If
End Sub
Private Sub cmdSendString_Click()
' for Notify
picNotify.BackColor = RGB(255, 0, 0)
r = mSendString(txtSendString.Text, ErrorString, picNotify.hWnd)
If r <> 0 Then
MsgBox ErrorString & " (" & CStr(r) & ")", vbCritical, "Error"
Else
txtGetString.Text = ErrorString
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If chkNotify.Value = 1 Then
UnSubClass picNotify.hWnd
End If
End Sub
|