Menu

Form Woes

Help
etherael
2010-01-28
2013-04-24
  • etherael

    etherael - 2010-01-28

    Hello,

    I'm a senior in college working on a software development project for my capstone (educational purposes), and the game I'm making requires a chat interface over a network. I came to the conclusion that if I could get your forms to work within my game, that would save me a ton of headaches (still have to confirm that with my teacher though).

    I downloaded the example solution that demonstrates how to implement the form, but I couldn't get it to work in my own code: formCollection = new FormCollection(window, service, ref graphics) keeps giving me a null reference run-time error—I checked beforehand to verify that the three arguments aren't null.

    Unless you can think of something off the top of your head, is there more that I should be doing to integrate the xWinFormsLib other than to include the dll?

    So after not having any luck with that I decided to tinker with the example solution you provided to demonstrate how the class can be used and got a chat box set up in a form I liked. The problem is, any time I add anything to the ListBox, it iterates through the entire string on a single line ("Hello" becomes "HHeHelHellHello" in the ListBox).

    Any suggestions there?

     
  • Fernando Rey

    Fernando Rey - 2010-02-10

    In order to fix the first problem, you need to just change the assemblies for the xWinFormsLib project from version 3.0 to version 3.1. You only need to do this for Microsoft.XNA.Framework and Microsoft.XNA.Framework.Game. Compile a new version of the library and use that one instead on your game. That should take care of the problem.

    The source of the issue is related to how the SpriteBatch object is created in run time and the GraphicsDevice meta members. Without accesing the SpriteBatch source code, I would venture to say that the problem is that the SpriteBatch constructor was looking for a member of GraphicsDevice which did not exist prior to XNA GS 3.1.

    I hope I was able to help you.

     

Log in to post a comment.

MongoDB Logo MongoDB