views:

852

answers:

2

Does anyone have a good strategy for adhering to Windows Design Guidelines with Windows Forms development in Visual Studio (2008)

For example just tring to adhere to font recommendations in Windows XP you have to know the system default font should be Tahoma, Verdana should be used for Title bars in floating windows and Trebuchet MS should be used in the Title bar of Windows....sigh...I assume its all different for Vista :-(

And of course what Visual Studio gives by default is a brain dead Microsoft Sans Serif.

So whats the best way to design, is there a plugin available that will help me, do I simply have to put up with sitting with the design guide open and manually do this. (painful)

Edit: Thanks for the visual styles suggestion, but that won't cut the mustard unfortunately (in fact Enable Visual Styles is the default in Visual Studio 2008) the XP look and feel winforms controls still use the microsoft sans serif font by default.

+2  A: 

To the best of my knowledge there isn't a pulgin available (i could be wrong, and probably am), but what I usually do is create a few copies of any project and have one for Vista with all it's fonts and another for XP. Hope this helps

Lucas McCoy
+4  A: 

You can have your Windows forms use the Windows theme fonts/colors/sizes etc by calling Application.EnableVisualStyles() in the right spot. Your forms will take on the attributes set in your currently selected Windows theme.

MSDN Page: http://msdn.microsoft.com/en-us/library/system.windows.forms.application.enablevisualstyles.aspx

Rorzilla
Good to know. I really didn't know this. +1
Jonathan C Dickinson
EnableVisualStyles() opts in to the Common Controls Library 6.0 controls. This means you will get the non-"flat" versions of the buttons, textboxes etc., but it won't affect fonts or colors. Note that VS2005+ inserts EnableVisualStudio when you create a WinForms project.
Rasmus Faber
See also http://blogs.msdn.com/rprabhu/archive/2003/09/28/56540.aspx
Rasmus Faber