hi guys,
It's a serial communication software, so what happens is:
the user clicks a button, I set the HourGlass, disable the button (to avoid ppl that are too used with FPS games), do the serial communication bit that last a couple of seconds, then the set the mouse back to normal and re-enable the button.
And I have a few more like those through the software using text boxes or drop-down menus.
the skeleton code is:
Sounds simple BUT, after the control been disabled and re-enabled the following routine stops been called:
My form is set in design time to be KeyPreview = True and I even tried to set it again after the Click. The routine is simply not called and the ESC key on the keyboard does not hide the form anymore.
Any ideas ???
It's a serial communication software, so what happens is:
the user clicks a button, I set the HourGlass, disable the button (to avoid ppl that are too used with FPS games), do the serial communication bit that last a couple of seconds, then the set the mouse back to normal and re-enable the button.
And I have a few more like those through the software using text boxes or drop-down menus.
the skeleton code is:
VB.NET:
Me.Cursor = Cursors.WaitCursor
Toggle.Enabled = False
' send communication bits
' receive the communication back
' update the received data
Me.Cursor = Cursors.Default
Toggle.Enabled = True
Sounds simple BUT, after the control been disabled and re-enabled the following routine stops been called:
VB.NET:
Private Sub frm_Setup_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If Asc(e.KeyChar) = 27 Then Me.Hide()
End Sub
Any ideas ???