I have a form created in Windows Forms which is draggable wherever I click. I made it by overriding WndProc function which in turn modifies each click as it was a title bar
If you just want to stop the double click from having it's default behavior in the window for which you've overridden the WndProc
then intercept the WM_LBUTTONDBLCLK
message
private const int WM_LBUTTONDBLCLK = 0x0203;
...
protected override void WndProc(ref Message message) {
if (message.Msg == WM_LBUTTONDBLCLK) {
return;
}
base.WndProc(ref message);
if (message.Msg == WM_NCHITTEST && (int)message.Result == HTCLIENT)
message.Result = (IntPtr)HTCAPTION;
}