Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring Keypress in textbox and combobox 1

Status
Not open for further replies.

granni

Programmer
Nov 8, 2000
36
SG
i have some textbox and combobox that i allow the user to delete at runtime by pressing the DEL key, problem is the keypress are processed after the control has been deleted from the controls collection(i believe) thats why my app just crashes out

Does anyone know how to try the keypresses?

Any help is always welcome
 
Set the form KeyPreview property to true. By doing this, all keypresses will go to the form first so that you can respond to it, delete the control that has focus, and null out the keypress before the control gets it. - Jeff Marler B-)
 
Thanks alot Jeff, i really appreciated the help In Christ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top