Yes a function can be used to handle more than one event. Just list all the events separated by commas after the 'handles' keyword
Private sub btnStart () handles btnStart.MouseEnter, btnStart.MouseLeave
Obviously the signature of the function has to match the signature of both the event's handlers. For example, one function can't handle both MouseEnter and MouseDown because MouseEnter requires an EventHandler function while MouseDown requires a MouseEventHandler function.
|