RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • About
  • Eric’s Toolset
  • Software
  • Software License
  •  

    Transparent WinForms Label

    November 28th, 2009

    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.

    Read the rest of this entry »


    Rounded Rectangluar Regions

    November 19th, 2009

    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.
    Read the rest of this entry »


    Why StringComparison.Ordinal Is Usually the Right Choice

    October 15th, 2007

    A question that arose in response to my previous post (about how string comparisons can produce unexpected results when done in a culture-sensitive way) was Which is right, StringComparison.Ordinal or StringComparison.InvariantCulture? The short answer: StringComparison.Ordinal.

    Read the rest of this entry »


    Unicode Surprises

    October 11th, 2007

    I got a defect from QA today saying that our product was unable to track files in paths containing Unicode characters. I’ll admit that I was skeptical. I had just tried that myself the other day and it worked perfectly. Trying it again today also worked perfectly, but the QA engineer showed me otherwise.

    Read the rest of this entry »


    Sleep Mode from .NET

    August 29th, 2007

    I have a little backup program that I wrote that includes the ability to shut down the machine when a backup is complete. I wanted to add the option of putting the machine to sleep instead of shutting down, but it took me a while to figure out how to accomplish this.

    Read the rest of this entry »


    Getting an IStream on a File

    April 28th, 2007

    Getting a COM IStream instance on a normal file seems like something that should be trivial to do, but it always seems to take some hunting to remember how it is actually done. Read the rest of this entry »


    File System Monitoring

    July 21st, 2006

    At times it is useful to keep tabs on what is happening (or has happened) in the file system. This is a brief overview of all the ways I know of to track activity on a Windows file system. Read the rest of this entry »


    Packing and Alignment

    June 24th, 2005

    I’ve made some effort to understand the differences between the Struct Member Alignment compiler option /Zp, #pragma pack and __declspec(align()) with Microsoft Visual C++ in light of an odd bug that ultimately was caused by inconsistent packing options between compilation units. Read the rest of this entry »


    .NET Context Menu Handler

    April 7th, 2005

    I’ve been working on a context menu handler shell extension in C# lately. There are a few samples that people have produced on the web (for example, The Code Project, pek.com, and TheServerSide.net). I’ve found a better way of implementing IShellExtInit.Initialize than in the examples I’ve seen. Read the rest of this entry »