Exemplo n.º 1
0
 /// This allows for the window to be moved without having a real border!
 private void Panel_TitleBar_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         WinAPIComponents.ReleaseCapture();
         WinAPIComponents.SendMessage(Handle, WinAPIComponents.WM_NCLBUTTONDOWN, WinAPIComponents.HT_CAPTION, 0);
     }
 }
Exemplo n.º 2
0
 // Allow for dragging around of the form.
 private void MainFormSmall_MouseMove(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         WinAPIComponents.ReleaseCapture();
         WinAPIComponents.SendMessage(Handle, WinAPIComponents.WM_NCLBUTTONDOWN, WinAPIComponents.HT_CAPTION, 0);
         this.Invalidate();
         Program.GDIOverlay.Invalidate();
     }
 }