How do I read embedded resources
Check out the entry titled How do I load a BMP file that has been added to my solution as an embedded resource? in this section. That code can be used for any kind of embedded resource.
How do I hide a column
There are several ways to hide a column: 1) You can use your DataSet’s ColumnMapping property to hide a column. // Creating connection and command sting string conStr = @”Provider=Microsoft.JET.OLEDB.4.0;data source=C:\northwind.mdb”; string sqlStr = ”SELECT * FROM Employees”; // Create connection object OleDbConnection conn = new OleDbConnection(conStr); // Create data adapter object OleDbDataAdapter da = new OleDbDataAdapter(sqlStr,conn); // Create a dataset object and fill with data using data adapter’s Fill method DataSet ds = new DataSet(); da.Fill(ds, ”Employees”); // Hide the column and attach dataset’s DefaultView to the datagrid control ds.Tables[”Employees”].Columns[”LastName”].ColumnMapping = MappingType.Hidden; dataGrid1.DataSource = ds.Tables[”Employees”]; 2) Another way to hide a column is to set its width to zero. Check out the FAQ How do I set the width of a column in my DataGrid?. 3) Another way to hide a column is to create a custom table style, and as you add columnstyles to your tablestyle, omit the column you want hidden. Check out the FAQ How do I add an unbound column in my bound DataGrid? to see how to create a custom table style.
Why does adding images to an ImageList in the designer cause them to lose their alpha channel?
Looks like the ImageList editor loses the transparency when it does some internal copy/clone of the images. However, it seems that it does work when you add the images in code to the ImageList. One workaround (not so tidy) is to add the images to the ImageList in the design time (so that your design-time will be closer to the runtime) and then clear that ImageList and refill it with the images again, in code. Take a look at this faq on how to add images to your project and retrieve them programatically during runtime. Adding image files to a project as an embedded resource and retrieving them programatically.
What’s new in the 1.1 framework?
This MSDN article by Chris Sells provides a good introduction to the 1.1 framework: http://msdn.microsoft.com/msdnmag/issues/03/03/WindowsForms/default.aspx For a list of breaking changes in 1.1: http://www.gotdotnet.com/team/changeinfo/default.aspx We will include more information here that is not covered in the above article. Please email any more info. you have to [email protected] After preliminary testing, it seems like the reordering of tab pages in the TabControl by the design time seems to be fixed. Why do I have to use the STAThread attribute for my main method in my app.? What are some common gotchas while trying to embed a Windows Forms Control in IE?
How do I listen to the screen resolution change in my control?
You should override WndProc in your control/form and listen to the WM_DISPLAYCHANGE message. Refer to this faq a WndProc override sample: How do I listen to windows messages in my Control?