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 click:
//found at: http://stackoverflow.com/questions/3995009/how-to-make-a-window-draggablec-winforms
private const int WM_NCHITTEST = 0x84;
private const int HTCLIENT = 0x1;
private const int HTCAPTION = 0x2;
///
/// Handling the window messages
///
protected override void WndProc(ref Message message)
{
base.WndProc(ref message);
if (message.Msg == WM_NCHITTEST && (int)message.Result == HTCLIENT)
message.Result = (IntPtr)HTCAPTION;
}
The problem is that now when I double click, the window becomes fullscreen, which is unwanted. How can I block this behavior?