Windows Develop Bookmark and Share   
 index > Windows Forms Designer > In Visual Basic .Net 2003 - capturing key press events in a ListBox.
 

In Visual Basic .Net 2003 - capturing key press events in a ListBox.

Similar topic, different circumstances.

I realized that the DataGrid in VB2003 was not working for me. So I switched to a listbox. I am still having difficulty getting some of the key_up, key_press or key_down events to recognize the keystrokes the way I wish.

If I leave it alone, the tab works exactly as I need it to, so now I only need to get the listbox to recognize the enter key.

Any sage advice?

Thanks again!

tmfoust  Thursday, April 12, 2007 2:15 PM

Nevermind. I found the answer.

I ended up using the Key_Press event and discovered that with the ListBox, the Tab and Arrow keys do one trigger this code. I was then able to place my code in the subroutine and have it execute as desired.

tmfoust  Thursday, April 12, 2007 8:39 PM

Nevermind. I found the answer.

I ended up using the Key_Press event and discovered that with the ListBox, the Tab and Arrow keys do one trigger this code. I was then able to place my code in the subroutine and have it execute as desired.

tmfoust  Thursday, April 12, 2007 8:39 PM

You can use google to search for other answers

Custom Search

More Threads

• "Duplicate Declaration" Error
• Available Colors Property in Designer
• CustomForm problem
• possible? one toolbox item for a cluster of controls?
• DesignSurface : Form size is greater with Vista theme
• Using IMenuCommandService
• Regarding statusbar in Win32
• Error after adding new form
• Making a UserControl behave like a Timer control at design time
• How to bubble events?