当我运行时RegisterHotKey,它返回false。可能的原因是什么?
internal void RegisterHotKey2(ModifierKeys modifier, Keys key)
{
_cID += 1;
if (!RegisterHotKey(_window.Handle, _cID, (uint)modifier, (uint)key))
{
Console.WriteLine("oh no: " + modifier.ToString() + " + " + key.ToString());
throw new InvalidOperationException("couldn't register noooooo");
}
}
旧版本(请不要判断)
internal void RegisterHotKey2(ModifierKeys modifier, Keys key)
{
_cID += 1;
if (!RegisterHotKey(_window.Handle, _cID, (uint)modifier, (uint)key))
Console.WriteLine("oh no: " + modifier.ToString() + " + " + key.ToString());
throw new InvalidOperationException("couldn't register noooooo");
}