如何隐藏XNA 4.0吗? [英] how to Hide XNA 4.0?
本文介绍了如何隐藏XNA 4.0吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图隐藏我的XNA游戏窗口,但我似乎并没有能够在这里是我到目前为止已经从我能下车,谷歌试图。
I'm Trying to hide my XNA game window but i don't seem to be able to here's what I've tried so far from what i could get off google.
Form frmXNA = (Form)Form.FromHandle(this.Window.Handle);
frmXNA.Hide();
我也试过
I have also tried
Form frmXNA = (Form)Form.FromHandle(this.Window.Handle);
frmXNA.Visible = false;
我想我做的事情很简单的错误,一旦它指出,我会在大概笑我怎么没看出来。感谢您的帮助。
I figure I'm doing something very simple wrong and once it's pointed out I'll probably laugh at how i didn't see it. Thanks for the help
推荐答案
在System.Windows.Form refrence添加到项目中,然后添加使用说明书:
add the System.Windows.Form refrence to the project and then add the using statment:
using System.Windows.Forms;
然后在初始化方法补充一点:
and then add this in the Initialize method:
Form MyGameForm = (Form)Form.FromHandle(Window.Handle);
MyGameForm.FormBorderStyle = FormBorderStyle.None;
编辑:
mybee与不透明播放
mybee the playing with the opacity
Form MyGameForm = (Form)Form.FromHandle(Window.Handle);
MyGameForm.Opacity = 0;
这篇关于如何隐藏XNA 4.0吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文