I am trying to add mouseenter and mouseleave events to each button while I'm looping through the controls like:
For each control in me.controls
With control
If TypeName(control) = "Button" Then
AddHandler control.MouseEnter, AddressOf control.DynamicButton_MouseEnter
AddHandler control.MouseLeave, AddressOf control.DynamicButton_MouseLeave
end if
next
And it says "MouseEnter is not an event of object". So I wonder how do I reference the dynamic button?