How can I programatically add and remove columns in my DataGrid without modifying the DataTable datasource

You can control the columns displayed in the DataGrid through the DataGrid.TableStyle[0].GridColumnStyles collection. To do so, create a DataGridTableStyle and set its MappingName property to point to the name of your DataTable which is the DataSource for the DataGrid. Next, add this DataGridTableStyle to the DataGrid.TableStyles property. Finally, set the DataGrid.DataSource property to the DataTable. Doing things in this order, guarantees that the DataGridTableStyle.GridColumnStyles collection will be fully populated showing all the DataTable columns in the the DataGrid. Then to add and remove columns from the DataGrid, you only have to add and remove DataGridColumnStyle objects from this DataGrid.TableStyle[0].GridColumnStyles collection. Removing them is straight-forward through a Remove method call. But inserting them requires more work as there is no InsertAt method defined for this collection. To handle this problem, you can create a new array of DataGridColumnStyles, and populate this array in the necessary order to reflect the DataGrid with an inserted column. Then you can clear the old collection, and create a new collection with this new array. You really are not creating all new DataGridColumnStyle objects, but are simply reordering the existing ones in a new collection. Here is a sample project containing both C# and VB.NET code showing how you might do this.

How can I read individual frames from an animated image?

GDI+ has direct support for reading and outputting animated images. To get at the individual frames, you can use the image’s FrameDimensionList, and then call SelectActiveFrame, by passing in the dimension and the zero based frame index. First, create a new FrameDimension object: FrameDimension dimension = new System.Drawing.Imaging.FrameDimension(myImage.FrameDimensionsList[0]); Once you have the dimension, you can get the frame count: int frameCount = myImage.GetFrameCount(dimension); Now, that you know the frame count of the image, you can call SelectActiveFrame by passing in the dimension and the frame index (zero based). myImage.SelectActiveFrame(dimension,1); If the image is being viewed at runtime, then the call to SelectActiveFrame will set the current frame, and then begin to loop through again (unless it is a jpeg image). The attached sample works around this by saving the image to a MemoryStream for display – thereby capturing the one frame that is chosen. Sample Application w/Source Code C# or VB

How can I change the font used in a grid cell on a cell by cell or row by row basis

One way to do this is to use a derived columnstyle, override the Paint method and do the text drawing yourself, using whatever font or colors you like. If you add an event to your derived column style that is fired immediately before the text is drawn, and use the event args to get the font and color information, you can let the event handler completely determine the look of any cell. The attached samples (C#, VB) use this technique to create a grid that looks like the grid in the picture. Both color and font varies on a cell basis or row basis in this picture.

Can I play audio and video files using .NET

You cannot directly do this using .NET. However, there are some wrapper classes available at http://www.mentalis.org/soft/class.qpx?id=1 that allow you to do just this. You can download the latest version of these classes directly from the site. We have packaged these classes as a library and added a simple Winforms sample and made these available here. This library basically uses the Media Control Interface (MCI).