Monthly Archives: May 2008

Getting a list of SQL Server databases on the network

I found this pretty easily with an Internet search.  Copying it here so I can be sure to find it next time I want it.  Courtesy of Dan Dittenhafer private static List EnumSqlServers() { System.Data.DataTable sqlInstances = System.Data.Sql.SqlDataSourceEnumerator.Instance.GetDataSources(); List listSqlServers = new List();// Loop to load the unique server names foreach (System.Data.DataColumn col in sqlInstances.Columns) […]

Adding icons to Windows Forms

I added an icon to a Windows Form, but it didn’t display.  Why not?  Because even though Visual Studio by default creates a 32x32x16 icon, you really need a 32x32x256 icon.  Right-click on the icon editor screen to select the desired format.  Thanks Jason Black.