I have a mdiparent with mdichild forms within it.
I found some code in this forum to help me handle when a form title bar is clicked (Reference A).
The mdiparent dynamically loads various forms (possible up to 100) and assigns them as mdi childs and manually assigning Reference A code in each would be inconvient.
I want to assign the code to each form when they load somehow of the mdichild, so they can detect when the titlebar is clicked.
How can achieve this.
Thanks for any assistance.
protected override void WndProc(ref Message m)
const Int32 WM_NCLBUTTONCLK = 161;
const Int32 WM_NCLBUTTONDBLCLK = 163;
if (m.Msg == WM_NCLBUTTONCLK)
TitleBarClicked(); // Implement this function and do what you need to do in this function
if (m.Msg == WM_NCLBUTTONDBLCLK)
TitlebarDoubleClicked(); // Implement this function and do what you need to do in this function
(Credited to k_swapnil)