I've created a VB.Net application which consists of a form and a series of classes. One class (GUI) contains all of the routines that handle the logic associated with the controls on my form. These controls are placed at design time.
I've having a problem with a couple of the timers on the form. They are declared in the GUI class thus:
Private WithEvents timerScreenUpdate As Timer
Private WithEvents timerDebug As Timer
Private Sub timerScreenUpdate_Tick(sender As System.Object, e As System.EventArgs) Handles timerScreenUpdate.Tick
Private Sub Monitor_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
Make sure that the reference and the Namespace-Import of
System.Windows.Forms is available in your project respectively class file.
Without it, VB will use a Timer from the namespace
System.Timers which you don't want to use in your case.