.NET/Windows API for .NET
UnregisterHotKey - 설정한 Hotkey의 해제
클리엘
2019. 8. 12. 11:49
728x90
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# 호출
함수의 인수중 handle은 Hotkey를 해제하고자 하는 Form의 handle을 그리고 id는 Hotkey를 설정할때의 id값을 그대로 전달하면 됩니다.
728x90