Using Kinect in a traditional windows application template RRS feed

  • General discussion

  • Hi,

    C#, VS2010, Windows7

    I am trying to create my first windows forms application that is Kinect capable. I noticed that all samples have the UI defined in XAML and use Image to show the view from the cameras in them.

    How can I replicate this in a Windows Form? That is, how can I visualize what the camera sees (the skeletal view, the depth view the VGA view etc) on a Windows form?


    In other words - How do I embed a object onto a Windows forms application?

    Thanks and regards

    • Edited by krarun Friday, December 16, 2011 10:46 AM
    Friday, December 16, 2011 10:29 AM

All replies

  • Nope, That wont help. 

    Perhaps I was not clear in my question.

    Kinect comes with a sample Skeletal viewer. Its a simple form that has 3 views, one of which shows what the webcam is seeing. This has been implemented in Xaml using the "Image" control. 


    Image i = new Image();

    BitmapSource source = BitmapSource.Create(image.Width, image.Height, 96, 96,

                    PixelFormats.Bgr32, null, image.Bits, image.Width * image.BytesPerPixel);


    i.Source = source; 


    Now this can be done in Xaml. My question is, how do I do this in a normal Windows forms application?

    Friday, December 16, 2011 12:08 PM
  • Ok, now I understand the question. So the big thing is how to convert a PlanarImage into something the PictureBox component can consume. 

    Please have a look at this thread then:


    Saturday, December 17, 2011 8:18 PM
  • It was possible in the first beta because the samples were normal form apps instead of wpf apps. I think they should have diagonostic and basic apps be put back to normal windows forms apps or have the option of programming in both because the newer diagonostic app doesnt work well in wpf and i want to make sure its not wpf thats causing the app to malfunction.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda

    • Edited by The Thinker Wednesday, December 28, 2011 2:40 PM
    Wednesday, December 28, 2011 2:39 PM