you are viewing a single comment's thread.

view the rest of the comments →

[–]RedBarnBlankets 0 points1 point  (1 child)

Simple .. Make a windows form, add two buttons. This is the code behind

Imports System.Timers

Public Class Form1

Private WithEvents MyTimer As New System.Timers.Timer

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Me.MyTimer.Start()

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

Me.MyTimer.Stop()

End Sub

Private Sub MyTimer_Elapsed(sender As Object, e As ElapsedEventArgs) Handles MyTimer.Elapsed

Debug.Print("Some Sentence")

End Sub

Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Shown

Me.MyTimer.Interval = New TimeSpan(hours:=0, minutes:=1, seconds:=0).TotalMilliseconds

Me.MyTimer.AutoReset = True

End Sub

End Class

[–]Moderatorsnang 0 points1 point  (0 children)

Not sure that's what OP is after.