ProcessDialogKeys not entered



The ProcessDialogKeys function is not entered when the Shift key is
being pressed. For instance I cannot do something like this:

switch (keyData)
case Keys.Space:
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
// Do something
// Do something else

Is there some kind work around for this. I want this action to be
performed no matter which control has focus.


John Bundy

I'm not sure what you are having trouble with. If you use the form event
KeyDown you can intercept the shift (value 16) with:

If it is not being able to see the events when you are in a control, then
under form properties set keypreview to true, this will cause the form to
process all key entries.

If neither of these is what you are looking for, please respond with what
you are doing, and what you expect to happen.

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