troubleshooting Question

C# MDI Child form textbox Ctrl+C not working

Avatar of power98888
power98888 asked on
C#Microsoft ApplicationsMicrosoft Development
1 Comment1 Solution1011 ViewsLast Modified:
Hi,

I have a MDI and a child form.  On the child form, the Ctrl+C not working.
I search lots of solution and find the one on MSDN but not really working.

I put this code in the MDI code but no help, the send message does capture something but
SendMessage may send wrong parameter whatever, no idea how to make it work
I need Ctrl + c, Ctrl + V + Ctrl +x work on the text box in the child form.

Please help.


//I put this code in the MDI code but no help, the send message does capture something but
//SendMessage may send wrong parameter whatever, no idea how to make it work
 
        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        static extern IntPtr SendMessage(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam);
 
 
        protected override bool ProcessCmdKey(ref Message message, Keys keydata)
        {
            SendMessage(this.ActiveMdiChild.Handle, message.Msg, message.WParam, message.LParam);
            return base.ProcessCmdKey(ref message, keydata);
        }
ASKER CERTIFIED SOLUTION
MRomani

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros