Things That Make My Life Hell, Part 1: App Domains

Brian in Coding | 0 Comments March 26, 2010

I’m going to start a new series of posts titled, “Things That Make My Life Hell”.  The goal of these posts isn’t to explain to you why you should be glad you’re not me.  No, the goal is to pick some of the harder, messier problems I’ve had to deal with and explain how I solved them.  That way, should you ever have the misfortune of facing the same problems, hopefully you’ll be armed with a solution.

For today’s misfortune I’d like to focus on .NET app domains. More...

Using Visual Studio Whidbey to Design Abstract Forms

Brian in Coding | 38 Comments February 20, 2005

A long time ago I posted an article explaining why Visual Studio can’t design abstract forms. I also promised that I’d show you a way you could make it work in Whidbey using Whidbey’s type description provider mechanism. Well, a long time has passed and I never wrote the follow-up. It’s time I fulfill my promise.


Note: While this is a cool and funky example of the power you wield with custom type description providers, Microsoft doesn't support abstract base classes in the designer, so if you use this technique in your own code, you are on your own.

More...

A Method to System.Design’s Madness

Brian in Coding | 0 Comments November 14, 2004

System.Design is an assembly that contains design-time classes such as ControlDesigner. The System assembly also contains a System.ComponentModel.Design namespace that contains design time classes. Even System.Windows.Forms contains a System.Windows.Forms.Design namespace. Was Microsoft just incredibly lazy here, randomly spreading classes wherever was convenient, or was there an actual purpose to this madness? And, if there was a purpose, what should you consider when writing your own controls with their own design time logic?

More...

Designers and Abstract Classes

Brian in Coding | 12 Comments May 31, 2004

Imagine this: you have a great software project you’re working on. You’ve decided to use Visual Studio’s Visual Inheritance feature so you can re-use portions of your application’s UI. While working on the base classes, you decide that all base forms need to provide a “Title” property, so you add the property and make it abstract. You go on for a little while longer and then open a designer for a form that derives from your base form. What do you get? A nice fat juicy error message stating that abstract classes cannot be designed.

More...

Got P/Invoke?

Brian in Coding | 0 Comments April 30, 2004

Jessica turned me on to a new Wiki site created by Adam Nathan that encapsulates all the Win32 API PInvoke definitions. Check it out: www.pinvoke.net. Because it's Wiki, anyone can change it, and hopefully as it catches on people will add in their own tips, tricks and gotchas. A great application of the Wiki model.