ESMITHY.NET

The Holiday Amazon Box Problem

By the time Christmas comes around, our house is usually awash with boxes from Amazon. It gets a bit tricky at that point, because I'm never sure if the box is something I ordered to give to my family, or something someone else sent me as a gift. In the …

Batch File Libraries

I've always considered batch files as kind of ghetto. Anything too complex devolves into a morass of gotos and labels. But I recently put together some install batch scripts that I was actually pleased with, including a clean mechanism for sharing common code.

A while back, I used WiX to …

Suppressing CA1062 with a Helper Function

I think Visual Studio's static analysis warning for checking parameters for null before they are used is generally a good idea, but the code to check the parameters can get really tedious.

Before addressing the tedium, though, why does it even matter whether you check for null arguments and throw …

Migrating from TFS to SVN

I've just spent the past few days migrating a Team Foundation Server source repository to Subversion. It took longer and was more difficult than I expected it to be.

Of course, the easy way is to just get the latest from the TFS repository and add all of the files …

IIS Configuration with WiX and Appcmd

I recently spent some time building an install package for a web application using WiX. There are some nice IIS extensions for WiX to help with that, but they're missing the ability to set some advanced properties, like an Application Pool's "Enable 32 Bit Applications" property.

Matt Honeycutt has a …

This solution contains a web site...

I kept getting a message from Visual Studio 2008 when opening a solution saying:

This solution contains a web site at 'http://localhost/Services'. There is already a web site at this location on this computer. Do you wish to use this existing location for your web site (existing files …

Defeating Antivirus System Pro

Antivirus System Pro is an irksome piece of malware that holds your computer hostage until you pay a ransom. It is nothing short of extortion. I just spent a few evenings removing it from a friend's computer, and the dozens of articles on the web (and even YouTube videos) were …

Transparent WinForms Label

Easy control transparency isn't exactly a hallmark of Windows Forms. If you have a form with a background image or a gradient, the stock controls paint with a solid background to give a criminally egregious aesthetic.

If you search the web for a solution, you might come up with a …

Rounded Rectangluar Regions

There are lots of examples that demonstrate how to draw a rectangle with rounded corners using GDI+ in .NET. Converting such a rectangle to a Region so that it can be filled or be used for the geometry of a window can have less than perfect results, though.

For example …

Silverlight Localization

The official Silverlight documentation about localization gives lots of information about working with resource files, but it is kind of scant on how to actually get localized strings to show up in the UI in a reasonable way. For example, an unreasonable way would be to set the text/content …