In a PushButton I have:
In MouseDown
If Me.Enabled = False Then
Return False
Else
Return True
End if
In MouseEnter
If Me.Enabled = False Then
Return
End if
Me.MouseCursor = System.Cursors.FingerPointer
In MouseUp
MessageBox(“I’m alive :)”)
Me.Enabled = False
If I disable the button in the IDE everything works as I expect. The button is ghosted, the cursor remains unchanged when I hover over the button and nothing happens when I click the mouse.
But if the button is enabled from the start it works only partially as I expect.
When I mouse over the button the first time the cursor changes and if I click I see a dialog and the button gets ghosted when I close the dialog.
If I now hover over the button again the cursor changes and I don’t expect that.
What am I missing here?