MDI Child Keydown not capturing CTRL-X, C, V

G

Guest

GridView KeyDown Event
This code works fine if the Form is NOT an MDI Child:

If e.KeyCode = Keys.V AndAlso e.Control = True Then
'ProcessPaste()
End If

If the Form is an MDI Child then event fires when the CTRL key is pressed
but does not fire when the 'V' key is pressed. However when I release the
keys the KeyUp event fires for the 'V' key first and then for the CTRL key.

I've tried setting both the MDI Child and the Parent's KeyPreview to TRUE
and capturing there but with the same results.

Any ideas?
 
B

Brian P. Hammer

This one got me for a while....

It is because the shortcut key is enabled for the cut, copy and paste
toolbar items. Sorry, but not on my dev machine and don't remember exactly
how I fixed it.

Brian
 
G

Guest

Thanks, that's exactly what the problem was. The developer working on the
MDI Parent left all the default menu options which included Cut, Copy and
Paste.

-Chris
 

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