Great Windows Forms Sample Application

A Brief History

I moved back to client application development from ASP.NET about a year ago, thus already had the advantage of using Scott Mitchell’s excellent data access tutorials. These tutorials subsequently became the foundation of my approach to n-tier development in the smart client world.

When you start windows form programming, there really are quite a lot of books and blog/forum posts, that it can be quite hard to get your head around which approach to use when looking at application scenarios.

Even today, you have examples like Dinner Now or the more recent Stock Trader application which are great, but the learning curve is quite steep, and one needs to have been developing for a few years to reap any real benefit from these sample applications.

Visual Studio 2005 was released in November 2005, and it had the final version of Windows Forms, before Microsoft migrated its focus to Windows Presentation Foundation. This is the same Windows Form version in Visual Studio 2008 and will be the same in Visual Studio 2010 (Microsoft have made no announcement about any updates, even though they said they would continue to invest in Windows Forms – no updates for 5 years, nice).

Sample Application

The Outlook 2003 Look and Feel sample (click on downloads on the right) has proved to be an excellent learning tool for me, and provided me with a really good example of structuring my line of business applications.

What you get is a fully working sample application


I love the way the application is structured


and you can extend this to connect to a database or web service with ease.

If you use a component suite like Krypton, you easily find you have an Office 2007 application within a matter of minutes. Judging by the leaked Office 14 (or Office 2009/10) images, you can rest assured that vendors will update their controls, and you will have the most modern and de facto business application UI.

I knew what a singleton was for example, but really came to appreciate when you need to use it in a application. There is also some Win32 wizardry, converting the standard tab strip into a navigation bar for instance, and in creating the other custom controls. If you choose to use the standard Windows Forms DataGridView control, you have examples on how to interact with the control, even to repaint the columns to achieve the layout you want.

All in all I love this sample application because it is a real world application, and the sample code is very extensible.