HotKey
Ctrl + SpaceWindowsフォームをアクティブ化するためのを定義しました。フォームがこれを処理する場合HotKey
、このイベントはシステムに表示されません。その後、これらのキーストロークを処理解除する方法はありますか?(つまり、登録を解除しHotKey
ます。)
これが私が試したことです:
private int tuyen_HotKey_Active = 1208132019;
private void Reg_HotKey(bool mode)
{
if (mode)
{
RegisterHotKey(this.Handle, tuyen_HotKey_Active, 2, 32); // Ctrl + Space
}
else
{
UnregisterHotKey(this.Handle, tuyen_HotKey_Active);
}
}
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x0312) if(m.WParam.ToInt32() == tuyen_HotKey_Active)
{
// Do something here. I want Ctrl + Space keystroke to be
// unhandled here so that it can be seen by the system.
}
base.WndProc(ref m);
}