Page 79 - Advantech WP-5530
P. 79
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Close Watch Dog
iDrawer = &H0
iRet = DeviceIoControl(DeviceHandle, ADV_COLSE_CTL_CODE, iDrawer, 4, 0, 0, iBytesRtn, 0)
If (iRet = 0 Or iBytesRtn <> 1) Then
MsgBox("Error opening ADVSYS.sys. Error = " & Err.LastDllError)
End If
Timer1.Enabled = False
TextBox1.Text = 0
Label2.Text = 0
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label2.Text = Val(Label2.Text) + 1
End Sub
End Class
72