c# 폼 드래그1 [C#] 폼 드래그 할때 이동 using System.Drawing; // 오버라이딩이므로 이벤트를 별도 생성하실 필요 없이 코드에 붙이시면 됩니다// MouseDown 시의 커서 위치를 저장해서, MouseMove 시에 Form의 Location에 반영하게 됩니다 private Point mCurrentPosition = new Point(0, 0); // protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if(e.Button == MouseButtons.Left) mCurrentPosition = new Point(-e.X, -e.Y); } protected override void OnMouseMove(MouseEventArgs e) { ba.. 2012. 10. 5. 이전 1 다음