Archive for January, 2009

XNA and WinForms

Friday, January 23rd, 2009

A lot of people don’t think it is possible to have winforms items (like buttons and dropdowns) in an XNA application, but I am here to prove them wrong. There is a ridiculously simple method of adding controls to your XNA application INSIDE the XNA window without too much hassle – as long as you are ok with coding up the items by hand.

One downfall is that this won’t work on the Xbox 360 since System.Windows.Forms is not included in the things XNA can render, but these types of UIs aren’t really the kind that would work well on an Xbox anyway.

Here is my method of adding the controls and a screenshot of the app running:

 protected override void Initialize() {
    var list = new ListBox();
    list.Items.Add("Here");
    list.Items.Add("Are");
    list.Items.Add("Some");
    list.Items.Add("Items");

    Control.FromHandle(Window.Handle).Controls.Add(list);
}

ListBox in an XNA window

I hope this method solves a lot of the issues people seem to be having with using these Controls together with XNA.

More Multitouch Table Fun

Wednesday, January 21st, 2009

Well, the multitouch table project I have been working on for a while reached a new milestone when my dad got involved. He has better tools and resources and more electronics experience, so he set up a pretty sweet frame for the table project I am working on.

Once there is some progress in the actual software side of things, I’ll post some videos of some interaction with the table itself. Until then here are the teaser pics


The disasembled camera

You can see the IR filter that gets replaced here

The lens from this will be used to keep the table shorter

The lenses from this will help keep the table shorter

Here is a shot my dad sent of the finished tabletop

Here is a shot my dad sent of the finished tabletop

Do NOT follow this link or you will be banned from the site!