Determine if Your C# Application is 64-bit

10 Comments »

It’s easy to determine if your C# application is 64-bit.  Just check the Size property of IntPtr.  If it’s 8, then your application is 64-bit.  If it’s 4, then your application is 32-bit.

Here is a simple C# console program to demonstrate this:

Read the rest of this entry »

DataGridView HideSelection to Hide Selection when Grid Loses Focus

3 Comments »

The DataGridView is a powerful grid control included in the .NET Framework.  One function missing, however, is the ability to hide the current selection when the DataGridView control is not focused.  What the DataGridView class needs is a HideSelection property, similar to the ListView and TextBox.  But the .NET designers have not included this capability in the DataGridView class.

Read the rest of this entry »