Embed XNA in WinForms

后端 未结 2 705
我在风中等你
我在风中等你 2020-12-10 12:01

Is it possible to embed an XNA game in a C# WinForm or a C++ Window. If yes then How.

I want to use normal UI controls & have a windowed interface of the game fo

相关标签:
2条回答
  • 2020-12-10 12:21

    I've had success doing this using the method described here:

    XNA 3.0 and Winforms, the easy way

    The blog post was written for XNA 3.0, but I had no problems using the same method with XNA 4.0.

    It's very simple compared to the official Microsoft sample, but as this method is not officially supported, you should use it at your own risk. It worked perfectly in my case, and it required only minimal changes to the Game class.

    0 讨论(0)
  • 2020-12-10 12:32

    The official samples:

    • XNA WinForms Series 1: Graphics Device
    • XNA WinForms Series 2: Content Loading
    0 讨论(0)
提交回复
热议问题