1: private Point 2: start_p; 3: // 클릭시 마우스 위치 4: private Point 5: end_p; 6: // 마우스 이동할때 위치 7: private bool mouse_move = false; // 마우스가 드레그 상태인지 8: 확인 9: private void button2_MouseMove(object sender, MouseEventArgs e) 10: // 마우스 11: 이동시 12: { 13: Point th; // 마우스의 현재위치를 계산하기 위한 폼의 14: 위치 15: if (mouse_move == true) 16: 17: { 18: th = 19: this.Location; 20: end_p = 21: ((Control)sender).PointToScr..
출처 : http://blog.naver.com/mcgyver3/40016726487 저자: 한동훈 C#에서 이벤트를 처리하는 방법에는 크게 두 가지가 있다(정확히는 세 가지 던가?). 한 가지는 클래스에 정의된 메소드를 오버라이드하는 방법이다. 이 경우에는 사용 언어가 VB.NET이냐 C#이냐에 따라 차이는 있지만 이벤트를 이용한 것이다. 다른 한 가지는 EventHandler 클래스를 이용하여 위임하는 것이다. 마우스 왼쪽 버튼을 클릭하면 윈도우에서는 버튼을 누르는 순간에 WM_LBUTTONDOWN과 버튼을 떼는 순간에 WM_LBUTTONUP이라는 메시지가 전달된다. 우리가 흔히 생각하는 클릭이라는 것은 이 두 가지 메시지가 빠르게 전달되는 것을 뜻한다. 폼에 있는 컨트롤을 클릭하면 이러한 메시지가 ..
출처 : http://blog.naver.com/bmk5133?Redirect=Log&logNo=80041790445 using System.Runtime.InteropServices; using Microsoft.Win32; // ---- ini 파일 의 읽고 쓰기를 위한 API 함수 선언 ---- [DllImport("kernel32.dll")] private static extern int GetPrivateProfileString( // ini Read 함수 String section, String key, String def, StringBuilder retVal, int size, String filePath);[DllImport("kernel32.dll")] private static ext..
C# Frequently Asked Questions for C++ programmers Andy McMullan Last update: 3-Dec-2000 This FAQ tries to address many of the basic questions that C++ developers have when they first come across C#. I recommend that you read the .NET Framework FAQ before reading this one. If you have any comments, suggestions, corrections or criticisms, please e-mail me at andy@andymcm.com. Disclaimer: The conte..
- Total
- Today
- Yesterday
- humor
- 프리랜서로 살아남는 법
- wallpaper
- Assembly
- Information Processor
- diary
- BadCode
- 3D Engine
- Battle
- Embedded System
- WDB
- 야마꼬툰
- USB Lecture
- Network Inspector
- console
- cartoon
- Reverse Engineering
- 나비효과
- Life News
- Mabinogi
- Military
- C#
- Tech News
- Linux
- 막장로그
- network
- medical
- 짤방 및 아이콘
- Web Programming
- win32
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |