ProcessDialogKeys not entered

  • Thread starter Thread starter jonpb
  • Start date Start date
J

jonpb

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
else
// Do something else
}

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

Thanks
 
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:
MsgBox(e.KeyValue)

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.
Thanks
 
Back
Top