private void btnPlay_Click(object sender, EventArgs e) { using (msgame game = new msgame()) { game.Run(); } }
[STAThread()] //!!! IMPORTANT: WPF-Controls need STAThread !!! static void Main(string[] args) { using (msgame game = new msgame()) { game.Run(); } //Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new mainFrm()); }