Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

newbie question on vcs2003 project conversion to 2005

6 views
Skip to first unread message

CobraS...@al.com

unread,
Nov 19, 2005, 12:39:13 PM11/19/05
to
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.


Stoitcho Goutsev (100) [C# MVP]

unread,
Nov 21, 2005, 11:06:42 AM11/21/05
to
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]

<CobraS...@al.com> wrote in message
news:5rJff.2553$hX5...@newsfe2-win.ntli.net...

0 new messages