Answers for "c# pass mouse events to parent"

C#
0

c# pass mouse events to parent

//Create a control inherited from Label and add the following code.
protected override void WndProc(ref Message m)
{
    const int WM_NCHITTEST = 0x0084;
    const int HTTRANSPARENT = (-1);

    if (m.Msg == WM_NCHITTEST)
    {
        m.Result = (IntPtr)HTTRANSPARENT;
    }
    else
    {
        base.WndProc(ref m);
    }
}
Posted by: Guest on June-26-2020

C# Answers by Framework

Browse Popular Code Answers by Language