Winform Button.Click not fired when I insert a break point at WM_PARENTNOTIFY

93 Views Asked by At

My Button.Click is not firing if I override WndProc and insert a break point at WM_PARENTNOTIFY. It fires if I subsequently remove the break point and click on the button again.

Does anyone know why is this happening? Thanks.

[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
protected override void WndProc(ref Message m)
{
    switch (m.Msg)
    {
        case WM_PARENTNOTIFY:
            break;
    }
    base.WndProc(ref m);
}
0

There are 0 best solutions below