0

我正在使用这个解决方案(第一个答案)来制作热键。所以,它有事件处理方法:

static void HotKeyManager_HotKeyPressed(object sender, HotKeyEventArgs e)
{
  Console.WriteLine("Hit me!");
}

如何在那里获取我的表单实例?我尝试使用 main 方法使表单成为类的静态字段,但我有System.ArgumentException: Controls created on one thread cannot be parented to a control on a different thread.如何做到这一点?

4

0 回答 0