Upgrade of Windows app from VS 2003 to VS 2005

D

david.topham

Hi

Can anyone help me with a project upgrade issue?:

If you creeate a C# Windows application in VS 2003, then by default
the forms do not have the XP look common controls. To get them, you
have to specify version 6.0.0.0 of Microsoft.Windows.Common-Controls
as a depency in a manifest file for the exe.

If you create a similar C# Windows app in VS2005, then by default the
forms do have the XP look common controls. That's how VS 2005 works -
I assume it's because it uses .net 2.0 rather than 1.1, or is
automatically emebedding a manifest in the executable.

Now, if you upgrade your VS2003 project in VS2005, and build it, the
same behaviour remains. Even though it is now being built against .net
2.0, the old style common controls are used unless you create
a .manifest file. I can't see any settings to alter this behaviour to
get the upgraded project to behave like the project created in VS2005.

Anybody have any ideas how to do that?

David Topham
 
M

Marc Gravell

static void Main() {
// add these two!
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// ... your app
}

Marc
 
D

david.topham

static void Main() {
// add these two!
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// ... your app
}

Marc

Yes, that does it. Kind of obvious when you know how. I'd looked at
project properties, form properties, assembly properties, etc. Just
not the actual code.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top