I create a control that inherts UserControl, add it into a Form, it
can't receive WM_HELP that sent by HelpButton of Form. You can re-appear it
by following steps:
1. Create a control class UserControl1, inherts UserControl.
2. Add it into form Form1.
3. Set Form1 properties: MaximizeBox = false, MinimizeBox = false,
HelpButton = true.
4. Click the HelpButton in Form, then click UserControl1, UserControl1
can't recieve WM_HELP event. It can recieve WM_HELP event by press F1.
5. I can recieve the WM_HELP event if add the following code into
UserControl1:
protectec override CreateParams CreateParams
{
get {
CreateParams createParams = base.CreateParams;
createParams.ExtStyle &= ~0x10000; // WS_EX_CONTROLPARENT
return creatParams;
}
}
I don't what the reason is. Could you help me to explain it? And find a
method to solve it,but not inherit the control. Thanks.
Jerry