.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
textbox Enter KeyEvent Argument not handled
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have a pallete with a textbox. The keydown event is triggered on every keydown event apart from Enter.
Private Sub txtBox_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtBox.KeyDown
If e.KeyCode = Forms.Keys.Enter Then MsgBox("Enter Pressed")
End SubHas me baffled.
Re: textbox Enter KeyEvent Argument not handled
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
the key <ENTER> has a special function as it is used to change the focus to the next control in tab-order. So the key is handled from another part and the event is then not fired to your eventhandler as "it is handled already".
I have searched a little and I think >>>that link (scroll down to the end)<<< comes close to what you are looking for.
The other opportunity would be to catch the LostFocus event it the fits to your workflow.
- alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: textbox Enter KeyEvent Argument not handled
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I tried the code from the page but it was causing some sort of problem in loading the pallete container.
I've found out that the KeyUp event can be used. The KeyDown and KeyPressed were two that I was trying previously.
But now that I think about it, the user has to make sure that they press enter so it's probably not what I want.
I think I should stick to doing it live with the TextChanged event.
Thanks again

