private void screensaverWindow_Load(object sender, System.EventArgs e)
{
this.BringToFront();
this.Focus();
this.KeyPreview = true;
this.KeyDown += new KeyEventHandler(onkeyDown);
}
onKeyDown()
永远没有被调用。有任何想法为什么吗?
编辑: 这在发布模式下起作用!?我猜一定是Visual Studio调试器在某个地方干扰了。