text:  - since beta 2 there can be more than one. To do this we use the static object Runtime and its Kinects collection:
  Runtime nui = Runtime.Kinects[0];
  The Runtime object that is returned is where everything is initialized and generally set up. The first thing that you have to do is specify which sensors you are going to use in what resolutions and modes. For example to setup the video camera you would use:
  nui.Initialize(RuntimeOptions.UseColor);
  In this case UseColor means use the video camera rather than the depth or skeletonization outputs.
  Next you need to open the sensor so that it starts to generate data:
  nui.VideoStream.Open( ImageStreamType.Video, 2, ImageResolution.Resolution640x480, ImageType.Color);
  Most of the parameters are obvious - the 2 specifies that the Kinect will buffer two frames before dropping frames because the PC is accepting them fast enough.
  At this point video data is flowing but to make use of it we need to define an event handler for the FrameReady even. As its name suggests this is called each time a video frame is ready for to be processed. Assuming that the even handling method is called FrameReady the event can be hooked up using:
  nui.VideoFrameReady += new EventHandler<ImageFrameReadyEventArgs>( FrameReady);
  Now we come to the most complicated part of the program as the event handler has to do something useful with the raw bitmap data that the video camera sends to it. The raw data is packaged in the event argument's
  ImageFrame.Image.Bits
  property as a byte array.
  The ImageFrame.Image property also includes some useful data such as the frame number and a time stamp but most of the time it is its Image property that we make use of.
  The raw pixel data is returned from the Image property in a yet another new bitmap wrapper - the PlanarImage struct. The good news is that this isn't a complex object but a simple structure with a few useful fields such as Height, Width and BytesPerPixel.
  Retrieving the raw bits is generally the first task for the event handler:
  void FrameReady(object sender, ImageFrameReadyEventArgs e){ PlanarImage Image = e.ImageFrame.Image; PlanarImage to a Bitmap without making any changes is a bit involved but its fairly standard "boilerplate" code that you can reuse - so lets write a function to do the job:
  Bitmap PImageToBitmap(PlanarImage PImage){
  You also need to add:
  using System.Drawing.Imaging;
  at the start of the program.
  This function takes a PlanarImage and returns a Bitmap with the same pixel data. Notice that this only works for a PlanarImage that used 32 bit RBGA format data - which is the case for the video sensor. You can modify the function as required as you use other sensors.
  First we need to create a Bitmap object capable of holding the pixel data:
  Bitmap bmap = new Bitmap( PImage.Width, PImage, PImage.Width, PImage.Height), ImageLockMode.WriteOnly, bmap.PixelFormat);
  Now we have a memory buffer waiting for the bits in the PlanarImage us the Copy method to move the data:
  IntPtr ptr = bmapdata.Scan0; Marshal.Copy(PImage.Bits, 0, ptr, PImage.Width * PImage.BytesPerPixel * PImage.Height);
  The first instruction stores the address of the start of the image buffer in ptr. The Copy method then proceeds to copy the data in PImage.Bits to the buffer that prt points at. The second parameter is an offset, usually zero and the final parameter gives the total number of bytes to copy.
  bmap.UnlockBits(bmapdata); return b>