Hi,
I have this code to move a borderless form which it works great. However when I double click the form it maximizes the form which I don't want.

I really need to disable the maximizing on double-click.
VB Code:
  1. private const int WM_NCHITTEST = 0x84;
  2.         private const int HTCLIENT = 0x1;
  3.         private const int HTCAPTION = 0x2;
  4.  
  5.         protected override void WndProc(ref System.Windows.Forms.Message m)
  6.         {
  7.             switch (m.Msg)
  8.             {
  9.                 case WM_NCHITTEST:
  10.                     base.WndProc(ref m);
  11.                     if (m.Result.ToInt32() == HTCLIENT) m.Result = new IntPtr(HTCAPTION);
  12.                     break;
  13.  
  14.                     //If m.Result.ToInt32 = HTCLIENT Then m.Result = IntPtr.op_Explicit(HTCAPTION) 'Try this in VS.NET 2002/2003 if the latter line of code doesn't do it... thx to Suhas for the tip.
  15.                 default:
  16.                     //Make sure you pass unhandled messages back to the default message handler.
  17.                     base.WndProc(ref m);
  18.                     break;
  19.             }
  20.         }
BTW, this is VS2003