예제 #1
0
 protected override void OnMouseDown(MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (Parent is Form)
         {
             if (((Form)Parent).WindowState == FormWindowState.Maximized)
             {
                 return;
             }
         }
         if (Drag.Contains(e.Location))
         {
             Capture = false;
             IntPtr  Val  = new IntPtr(2);
             IntPtr  NULL = IntPtr.Zero;
             Message msg  = Message.Create(Parent.Handle, 161, Val, NULL);
             DefWndProc(ref msg);
         }
         else
         {
             if (Current != Direction.NONE & Resizeable)
             {
                 Capture = false;
                 IntPtr  Val  = new IntPtr(Convert.ToInt32(Current));
                 IntPtr  NULL = IntPtr.Zero;
                 Message msg  = Message.Create(Parent.Handle, 161, Val, NULL);
                 DefWndProc(ref msg);
             }
         }
     }
     base.OnMouseDown(e);
 }