stoffel85
03-15-2006, 02:35 AM
Hi
I am trying to make a toolbar that goes away when the escape key is hit (if something on the toolbar has focus. But whatever I try (keyevents with toolbar, textbox, button) none work.
Private Sub tlTxtBleh_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tlTitel.KeyPress
If (Asc(e.KeyChar) = Keys.Escape) Then
toolZoeken.Visible = False
End If
End Sub
I also tried the KeyUp, KeyDown events, those don't work either.
Any idea why?
Edit: Sorry, wrong place. Can anybody move it?
Edit: This is a doublepost, it may be deleted. I couldn't find my other thread, but I just found it: http://dotnetforums.net/showthread.php?p=454624#post454624
I am trying to make a toolbar that goes away when the escape key is hit (if something on the toolbar has focus. But whatever I try (keyevents with toolbar, textbox, button) none work.
Private Sub tlTxtBleh_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles tlTitel.KeyPress
If (Asc(e.KeyChar) = Keys.Escape) Then
toolZoeken.Visible = False
End If
End Sub
I also tried the KeyUp, KeyDown events, those don't work either.
Any idea why?
Edit: Sorry, wrong place. Can anybody move it?
Edit: This is a doublepost, it may be deleted. I couldn't find my other thread, but I just found it: http://dotnetforums.net/showthread.php?p=454624#post454624