I'm working with an embedded vb editor in Proficy Workflow (tool of GE).
Basically it's the same as MS VB editor, (which version i don't know).
I'm getting the error, when starting my timer which I declared earlier.
I posted my question just to make sure my code is ok,
I've put the following code:
Public class Timer1 public shared sub main Dim aTimer as New System.Timers.Timer() AddHandler aTimer.Elapsed, AddressOf OnTimedEvent ' Set the Interval to 5 seconds. aTimer.Interval = 5000 aTimer.Enabled = True end sub ' todo Private Shared Sub OnTimedEvent(ByVal source As Object, ByVal e As System.Timers.ElapsedEventArgs) Messagebox.show("Hello World!") End Sub end class
Starting the timer:
Private Sub but_start_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) aTimer1.start() End Sub
Where did I go wrong?