且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

XNA和Windows表单

更新时间:2023-12-06 13:47:58

好吧,我不确定您在做什么是一个好主意,但是我唯一可以看到的做到这一点的方法现在,在我疲惫的心态中,是开始一个新线程.即

Well I am not sure what you are doing is a good idea but the only way I can see to do this right now in my tired state of mind is to start a new thread. i.e.

private void button1_Click(object sender, EventArgs e)
{
    System.Threading.Thread thStartGame = new System.Threading.Thread(StartGame);
    thStartGame.Start();
}

private void StartGame()
{
    Game1 game = new Game1();
    game.Run();
}