This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/vb.net/vbnet_test.bas
Oleh Prypin 6f43092173
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
2021-01-20 10:48:45 +01:00

29 lines
846 B
QBasic

Public Class Form1
Inherits System.Windows.Forms.Form
Private t As New System.Timers.Timer(2000)
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
AddHandler t.Elapsed, AddressOf TimerFired
End Sub
Private Sub btnStart_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnStart.Click
t.Enabled = True
End Sub
Private Sub btnStop_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnStop.Click
t.Enabled = False
End Sub
Public Sub TimerFired(ByVal sender As Object, _
ByVal e As System.Timers.ElapsedEventArgs)
Label1.Text = "Signal Time = " & e.SignalTime.ToString
End Sub
End Class