분류 전체보기

    CreateCursor - 새로운 Cursor 생성

    CreateCursor함수는 새로운 Mouse Cursor를 생성하는 함수입니다. Declare Function CreateCursor Lib "user32" Alias "CreateCursor" (ByVal hInstance As Integer, ByVal nXhotspot As Integer, ByVal nYhotspot As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal lpANDbitPlane() As Byte, ByVal lpXORbitPlane() As Byte) As Integer ▶VB.NET 선언 Dim andbitMskCur(0 To 127) As Byte Dim xorbitMskCur(0 To 127) As Byt..

    GetClipCursor - ClipCursor를 통한 제한영역 표시

    Mouse를 움직일 수 있는 영역을 제한하는 함수로 ClipCursor함수가 있습니다. [Windows API for .NET] - ClipCursor - Mouse의 움직임영역 제한 이 함수는 ClipCursor함수로 설정된 영역에 대한 값을 반환합니다. Declare Function GetClipCursor Lib "user32" Alias "GetClipCursor" (ByRef lprc As RECT) As Integer ▶VB.NET 선언 Public Structure RECT Public left As Integer Public top As Integer Public right As Integer Public bottom As Integer End Structure Dim m_point As ..

    SetCursor - 현재 Mouse Cursor의 변경

    SetCursor함수는 현재 Mouse Cursor를 일시적으로 변경하는 함수입니다. Declare Function SetCursor Lib "user32" Alias "SetCursor" (ByVal hCursor As Integer) As Integer ▶VB.NET 선언 SetCursor(handle) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int SetCursor(int hCursor); ▶C# 선언 SetCursor(handle); ▶C# 호출 SetCursor함수의 인수는 설정하고자 하는 Cursor의 Handle(LoadCursorFromFile이나 CreateCursor함수로 만들어진)을 기술하면 됩니다. 다만 이 인수를 0으..

    SetCursorPos - Mouse Cursor의 이동

    SetCursorPos함수는 Mouse Cursor를 지정한 영역으로 이동시킵니다. Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Integer, ByVal y As Integer) As Integer ▶VB.NET 선언 SetCursorPos(x, y) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int SetCursorPos(int x, int y); ▶C# 선언 SetCursorPos(x, y); ▶C# 호출 SetCursorPos함수사용시 x와 y에 정수형으로 위치를 지정하면 Mouse Cursor가 해당 위치로 이동하게 됩니다. 이 함수는 ClipC..

    GetCapture - Mouse Event입력 Handle반환

    GetCapture함수는 현재 Mouse를 통해 입력을 받고 있는 Control이나 Windows의 Handle을 반환합니다. Declare Function GetCapture Lib "user32" Alias "GetCapture" () As Integer ▶VB.NET 선언 GetCapture() ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int GetCapture(); ▶C# 선언 GetCapture(); ▶C# 호출 GetCapture함수가 정상적으로 실행되면 해당 Handle을 반환하지만 그렇지 못한 경우에는 0을 반환합니다.

    GetDoubleClickTime - Mouse Double Click Timming

    GetDoubleClickTime함수는 현재 Windows에 설정되어 있는 Double click시간간격을 반환합니다. Declare Function GetDoubleClickTime Lib "user32" Alias "GetDoubleClickTime" () As Integer ▶VB.NET 선언 GetDoubleClickTime() ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int GetDoubleClickTime(); ▶C# 선언 GetDoubleClickTime(); ▶C# 호출 함수가 실행에 실패할 경우에는 0을 반환하게 됩니다.

    mouse_event - Mouse Event 발생

    mouse_event함수는 인수로 지정한 내용의 Mouse Event를 발생시킵니다. Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtaInfo As Integer) ▶VB.NET 선언 mouse_event(flag, x, y, cbtn, 0) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dw..

    SetDoubleClickTime - Mouse Double Click 감지 시간 설정

    SetDoubleClickTime함수는 Mouse를 Double Click하는 시간단위를 설정하도록 합니다. Declare Function SetDoubleClickTime Lib "user32" Alias "SetDoubleClickTime" (ByVal wCount As Integer) As Integer ▶VB.NET 선언 SetDoubleClickTime(t) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int ReleaseCapture(); ▶C# 선언 SetDoubleClickTime(t); ▶C# 호출 함수의 인수로 건네지는 t는 약 1/1000 단위입니다. SetDoubleClickTime함수는 실행에 실패할 경우 0을 반환합니다.