How to load content when hosting on win forms? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionI'm trying to host xna into windows form. But when I use "Content.Load":
spriteFont = content.Load<SpriteFont>(@"Content\Fonts\smallFont");
it gives me an error:
File not found.
I think this is because I have no "Co开发者_开发技巧ntent reference" in my win forms project.
My question is: How can I load content when hosting xna on win forms? Or how to add "content reference" into win forms project?
thanks!
Here is a good tutorial on how to use XNA in WinForms, plus load content.
XNA WinForms
精彩评论