Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- templates
- 델파이
- get_object_or_404
- advColumnGrid
- pythonanywhere
- c#
- dbadvgrid
- Push
- COMMIT
- pyhcarm
- Django
- hackerrank
- MSSQL
- delphi 10.3
- github
- declare
- blog
- Visual Studio
- HTML
- TMS
- rank
- python3
- 백준
- PyCharm
- 중복제거
- python 3.7
- GIT
- anaconda3
- queryset
- Delphi
Archives
- Today
- Total
DevHyun
클릭 후 드래그로 이동시키기 본문
private Point point = new Point();
// mousedown 이벤트
private void panel2_MouseDown(object sender, MouseEventArgs e)
{
// 클릭후 드래그로 폼 이동시 사용
point = new Point(e.X, e.Y);
}
// mousemove 이벤트
// mouseup 이벤트에서 사용시 버벅거림 현상이 생김
private void panel2_MouseMove(object sender, MouseEventArgs e)
{
// 클릭후 드래그로 폼 이동시 사용
if ((e.Button & MouseButtons.Left) == MouseButtons.Left)
{
this.Location = new Point(this.Left - (point.X - e.X), this.Top - (point.Y - e.Y));
}
}
'C#' 카테고리의 다른 글
Dictionary 활용 (0) | 2023.11.09 |
---|---|
다른 폼 메소드 참조하기 (1) | 2023.11.09 |
디렉토리 생성 (1) | 2023.11.09 |
ini 파일 읽고 쓰기 (0) | 2023.11.09 |
프로세스를 종료시키는 방법 (0) | 2023.11.09 |
Comments