power98888
asked on
C# MDI Child form textbox Ctrl+C not working
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 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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.