전체 글

전체 글

    GetCaretPos - 표시되는 Caret의 위치반환

    GetCaretPos 함수는 Caret이 표시되는 위치값을 반환합니다. Declare Function GetCaretPos Lib "user32" Alias "GetCaretPos" (ByRef lpPoint As POINTAPI) As Integer ▶VB.NET 선언 Public Structure POINTCRT Public x As Integer Public y As Integer End Structure Dim pt As POINTCRT GetCaretPos(pt) pt.x pt.y ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int GetCaretPos(ref POINTCRT hwnd); ▶C# 선언 public struct POINTC..

    HideCaret - Caret 숨김

    HideCaret 함수는 Caret을 보이지 않도록 합니다. Declare Function HideCaret Lib "user32" (ByVal hwnd As Integer) As Integer ▶VB.NET 선언 HideCaret(handle) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int HideCaret(int hwnd); ▶C# 선언 HideCaret(handle); ▶C# 호출 HideCaret함수 호출시 인수로는 Caret이 표시되고 있는 개체의 Handle을 지정합니다.

    ShowCaret - 생성한 Caret 보이기

    ShowCaret함수는 CreateCaret함수에 의해 생성된 Caret를 화면에 표시하도록 합니다. Declare Function ShowCaret Lib "user32" (ByVal hwnd As Integer) As Integer ▶VB.NET 선언 ShowCaret(Handle) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int ShowCaret(int hwnd); ▶C# 선언 ShowCaret(Handle); ▶C# 호출 ShowCaret의 인수로는 Caret이 생성된 Form이나 Control의 Handle값을 넘겨주면 됩니다.

    CreateCaret - Caret 생성

    CreateCaret함수는 새로운 Caret를 생성하는 함수입니다. Caret은 Textbox등에서 깜빡이는 일종의 Keyboard Cursor모양정도로 생각하시면 되겠습니다. Declare Function CreateCaret Lib "user32" Alias "CreateCaret" (ByVal hwnd As Integer, ByVal hBitmap As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer) As Integer ▶VB.NET 선언 CreateCaret(Handle, Bitmap, 가로크기, 세로크기) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int CreateCaret(..

    GetComputerName - Computer Name 보기

    Computer의 Network이름을 알아내는 API입니다. 이 API대신 다음 .NET Class Library를 사용하십시오. 이 Code는 Computer의 이름을 반환합니다. System.Windows.Forms.SystemInformation.ComputerName ▶VB.NET/C#

    SetFocus - Window Form및 Control Focus 설정

    SetFocus함수는 Window Form또는 특정 Control에 Focus가 위치하도록 합니다. Declare Function SetFocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Integer) As Integer ▶VB.NET 선언 SetFocus(Handle) ▶VB.NET 호출 [DllImport("user32.dll")] private static extern int SetFocus(int hwnd); ▶C# 선언 SetFocus((int)Handle); ▶C# 호출 SetFocus함수 호출시 인수로 전달하는 값은 Focus를 줄 Window Form의 handle이나 Control의 handle값을 넘겨 주면 됩니다. 만일 함수의 인수로 정수가 아..

    RegisterHotKey - Windows Hotkey 설정

    RegisterHotKey함수는 특정 Key의 조합으로 Hotkey를 설정하여 특정 Process나 Software에 설정한 Hotkey를 활용할 수 있도록 합니다. Declare Function RegisterHotKey Lib "user32" Alias "RegisterHotKey" (ByVal hwnd As Integer, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer ▶VB.NET 선언 RegisterHotKey(handle, id, mod_key, key) ▶VB.NET 호출 [DllImport("user32.dll")] private static extern int RegisterHotKey(..

    UnregisterHotKey - 설정한 Hotkey의 해제

    UnregisterHotKey함수는 RegisterHotKey함수로 설정한 Hotkey를 더이상 사용하지 않도록 해제하는 함수입니다. Declare Function UnregisterHotKey Lib "user32" Alias "UnregisterHotKey" (ByVal hwnd As Integer, ByVal id As Integer) As Integer ▶VB.NET 선언 UnregisterHotKey(handle, id) ▶VB.NET 호출 [DllImport("user32.dll")] private static extern int UnregisterHotKey(int hwnd, int id); ▶C# 선언 UnregisterHotKey(handle, id); ▶C# 호출 함수의 인수중 hand..