Advertisement
GustasRBLX

Untitled

May 12th, 2019
5,193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. 1st:
  2.  
  3. private bool dragging = false;
  4. private Point offset;
  5. private Point start_point = new Point(0, 0);
  6.  
  7. MouseDown:
  8.  
  9. dragging = true;
  10. start_point = new Point(e.X, e.Y);
  11. MouseMove:
  12.  
  13. if (dragging)
  14. {
  15. Point p = PointToScreen(e.Location);
  16. Location = new Point(p.X - this.start_point.X, p.Y - this.start_point.Y);
  17. }
  18. MouseUp:
  19.  
  20. dragging = false;
  21.  
  22. Minimize And Exit!
  23.  
  24. Minimize : this.WindowState = FormWindowState.Minimized;
  25. Exit : Application.Exit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement