728x90
반응형
728x170
■ RegisterHotKey API 함수를 선언하는 방법을 보여준다.
▶ 예제 코드 (C#)
using System;
using System.Runtime.InteropServices;
#region 핫키 등록하기 - RegisterHotKey(windowHandle, id, modifiers, virtualKey)
/// <summary>
/// 핫키 등록하기
/// </summary>
/// <param name="windowHandle">윈도우 핸들</param>
/// <param name="id">ID</param>
/// <param name="modifiers">수정자</param>
/// <param name="virtualKey">가상 키</param>
/// <returns>처리 결과</returns>
[DllImport("user32")]
private static extern bool RegisterHotKey(IntPtr windowHandle, int id, uint modifiers, uint virtualKey);
#endregion
728x90
반응형
그리드형(광고전용)
'C# > WIN32' 카테고리의 다른 글
[C#/WIN32] GetMessageExtraInfo API 함수 선언하기 (0) | 2021.01.21 |
---|---|
[C#/WIN32] SendInput API 함수 선언하기 (0) | 2021.01.21 |
[C#/WIN32] WTSUnRegisterSessionNotification API 함수 선언하기 (0) | 2021.01.10 |
[C#/WIN32] WTSRegisterSessionNotification API 함수 선언하기 (0) | 2021.01.10 |
[C#/WIN32] UnregisterHotKey API 함수 선언하기 (0) | 2021.01.10 |
[C#/WIN32] PlaySound API 함수 선언하기 (0) | 2020.12.28 |
[C#/WIN32] PlaySound API 함수 선언하기 (0) | 2020.12.28 |
[C#/WIN32] InternetGetConnectedState API 함수 선언하기 (0) | 2020.12.28 |
[C#/WIN32] keybd_event API 함수 선언하기 (0) | 2020.12.28 |
[C#/WIN32] SwitchDesktop API 함수 선언하기 (0) | 2020.12.27 |
댓글을 달아 주세요