Where can I find information on globalization
Here are some MSDN globalization samples: Visual Basic .NET Code Sample: Working with Resource Files .NET Samples – How To: Globalization and NLS Also look at the following topic in online help inside IDE. Developing World-Ready Applications
How do I conditionally include certain methods based on some preprocessor defines?
You have the regular #if and #else preprocessor directive inside which you could place your code. Take a look at the ‘C# Preprocessor Directives’ section for the complete list of preprocessor directives. There is also a concept of ‘Conditonal Methods’ that will let you declare some methods as conditional methods based on the presence of certain preprocessor directives, using the ConditionalAttribute. Then the compiler will not only ignore the method, but also the method-call if the preprocessor symbol is not defined. Take a look at this MSDN section for more information: Conditional Methods Tutorial
How do I embed a manifest file into my exe
A Win32 resource must be added to your .exe. The type of the resource must be ‘RT_MANIFEST’ and the resource id must be ‘1’. An easy way to do this is with Visual Studio.NET: Open your exe in VS (file -> open file) Right click on it and select add resource Click ‘Import…’ from the dialog Select your manifest file In the ‘Resource Type’ field, enter ‘RT_MANIFEST’ In the property grid, change the resource ID from ‘101’ to ‘1’. Save the exe. From Mike Harsh at gotnetdot.com.
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.