form keypreview, comboxes & datagrid

R

ray well

hi,

i need to preview the keys in my app in order to process F1-F10. i set
keypreview of my form to true, and it does capture the keystrokes from all
over the forms controls which i then
process.

i found 2 puzzeling exception: if the user is inside the text box of a
ComboBox, the keystrokes aren't
captured in the form's keypress event. i have to separately capture the
keypress event of the combobox.

it is even worse in the datagrid. if the user is inside a cell, the form's
keypress is not captured. if u click on on row or column caption then the
form's keypress event works, but not if the u r inside the cell. i couldn't
find a solution for this, because if i capture the datagrid's keypress, it
too only works if the focus is not inside a cell. this is very weird. how do
i capture form keypresses or even datagrid keypresses when a user is inside
a cell within a datagrid?

thanks for any help

ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top