newbie question on vcs2003 project conversion to 2005

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all,
I used vcs2005 express to convert vcs2003 project, thats fine, but the look of buttons etc have not changed,
what do I need to do to get the new look with minimun amount of work.

Thank You For Your Help.
 
What kind of look are you after? If it is just a windows XP look it is
possible with .NET1.x (VS2003) also

For VS2003 you need to add the following lines in your Main method (before
you call Application.Run method)

if(Environment.OSVersion.Version.Major > 5 ||
(Environment.OSVersion.Version.Major == 5 &&
Environment.OSVersion.Version.Minor >= 1))
{
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.DoEvents();
}


then you need to go over all your UI controls, such as buttons, groupboxes,
comboboxes, etc and set their FlatStyle to FlatStyle.System. If you don't do
that the UI will keep showing with the old look and feel.

For .NET 2.0 (VS2005) the only think that you need to do is to add
System.Windows.Forms.Application.EnableVisualStyles();
call in your Main method. You don't need to change the FlatStyle. Project
convertor don't do this for you.

If you are after the new menu and toolbar controls, I'm afraid you need to
add and program them from scrach. The converter don't convert the old
toolbars and menus to the new cool MenuStrip and ToolStrip controls.


HTH
Stoitcho Goutsev (100) [C# MVP]
 
Back
Top