Search code examples
winformsxnatexture2d

Is there a way to correctly use an Image in XNA and windows forms...?


I just don't quite know how to handle this situation I'm dealing with.

I have a image of terrain tiles. In fact, here is a picture of it:

enter image description here

I've been working on my Map Editor for my game which has some windows forms in it like this:

enter image description here

Now, the problem is that both the XNA and the Windows Forms needs the image of the sprite tiles. Is there a way to handle this nicely or am I going to have to have two copies of the image (one for the WinForms and one for the XNA)?

Thanks for the help!


Solution

  • You don't need two copies of the image. Have you looked at the WinForms examples on AppHub?

    http://create.msdn.com/education/catalog/sample/winforms_series_2