Friday, December 24, 2004

Optimizing VS.Net

In my quest for the zen-est VS.Net development I can get, I've started tweaking the project templates that come with the default install:

For starters, Project default Imports are bad. These are typically found here by right clicking the Project in the Project Explorer windows, and clicking Properties. Under Common Properties > Imports, there is a default list of Imports. I delete all but Microsoft.VisualBasic. This forces me to Add Imports statements to every source file I create. This is good, because you know where everyhting is refereced from right in your source files, not some hiddedn project settings.

This then requires a few Import Statement to ALWAYS be added to certain types of files. For example, AssemblyInfo files will now have to have "Imports System" added every time you create a new project. I knew these were probably just some template files on disk somewhere and started doing some investigative work. Viola' ! They are located here:

C:\Program Files\Microsoft Visual Studio
.NET\Vb7\VBWizards\AssemblyInfo\Templates

So I just crank up notepad (metapad, actually, it rocks hard) and edit:

C:\Program Files\Microsoft Visual Studio
.NET\Vb7\VBWizards\AssemblyInfo\Templates\1033\AssemblyInfo.vb

To add the "Imports System" statement at the top
I also modified all the other templates, including

C:\Program Files\Microsoft Visual Studio
.NET\Vb7\VBWizards\WindowsApplication\Templates\1033\WindowsApplication.vbproj


I changed the section that looked like:

<imports>
<import namespace = "Microsoft.VisualBasic">
<import namespace = "System">
<import namespace = "System.Collections">
<import namespace = "System.Data">
<import namespace = "System.Drawing">
<import namespace = "System.Diagnostics">
<import namespace = "System.Windows.Forms">
</imports>

To look like:

<imports>
<import namespace = "Microsoft.VisualBasic">
</imports>


Then I modified all the .vb template files to add in the proper imports statements.

Monday, September 13, 2004

Hurricane Ivan

Looks like Ivan is going to pay us a visit.

Thursday, March 04, 2004

Feeling Better

I'm glad my wife is feeling better. She's just come home from a 10 day stay in the hospital.
Diagnosis: Ulcerated Colitis / Crohn's Disease

Monday, March 01, 2004

Convert Class in .NET

Programmer's Corner - Checking for Equality in VB.Net Source Code Sample

The convert class in .NET does what atoi does in CPP.

convert.toint32(48) returns 0 (48 is the ascii value for 0)
Who'da thunk?