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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combobox with form keypress event

Status
Not open for further replies.

Durkin

Programmer
Nov 6, 2000
304
GB
Hi. I have the keypreview property of a form set to True and I am handling certain keys at the form level. This works fine for all controls except when a combobox has the focus. Has anyone seen this before and is there a remedy?

Durkin
 
Sorted. I was using a derived combobox so I stuck in an overridden OnKeyDown method. It calls a routine on the mdiparent form which accepts the KeyEventArgs from the control. So if it handles the keydown event the control does nothing and if it doesn't then the combobox does it's normal thing.

Durkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top