隐藏XNA窗口,使其无法查看

时间:2015-01-08 22:39:38

标签: c# xna window hide

我正在尝试隐藏XNA窗口(因此它在任务栏中无法查看等)

我该怎么做?

由于

1 个答案:

答案 0 :(得分:0)

确保添加对" System.Windows.Forms"的引用。在您的项目中,然后在要隐藏窗口的位置添加以下代码:

System.Windows.Forms.Form frm = (System.Windows.Forms.Form)System.Windows.Forms.Form.FromHandle(Window.Handle);
frm.Hide();

请确保您可以在使用此代码的地方访问Window

相关问题