I need to make the Copy, Paste work on my MDIChild Form's textBox.
On Googling I found that ProcessCmdKey method needs to be overriden on MDI Parent and SendMessage api function needs to be used to let the MDI Parent form forward the keystrokes to the MdiChild form.
When I wired the ProcessCmdKey, the textbox on the MDIChild form stopped taking any keys at all. Can someone please step me through it ?
I just did a little test. I created a different winforms app, with 1 MDI and 1 Child form in it. I put a text box on child form.
I created a user control in the same project and put a text box in it, and than put that user control on the child form.
I ran the app, and loaded the child form through mdi form's Load event.
I copied some text from some other app, and did the "Ctrl + v" on both the text boxes (simple text box and textbox inside the user control), they both worked fine!!
now i am confused, what's really goin on?
I think I didn't give the enough Information before.
My MDI Form is being derived from a BaseForm which is in turn derived from Form class.
I copied BaseForm class to my new test project (which I mentioned above in UPDATE 1) and made my child form and the MDI form derive from this BaseForm, but it still works ok, ie Ctrl + C, Ctrl + V works fine on textbox on child form.
Can someone help me brainstorming with this ?