buttons don't look XP-style

quwiltw

Contributor
Joined
Sep 18, 2001
Messages
486
Location
Washington, D.C.
I'm running XP professional. The problem is that I've got all my command buttons set to Flatstyle=System and they look xp-style in the designer, but when I run the application the buttons look like old regular buttons. What's wrong?
 
I'm running xp pro as well; but every time I create a button, they come up looking like good ol reg buttons in the designer...

Is there something that we have to set in the options of vb.net or vs to have xp style buttons appear?
 
You need to add a manifest to your application to enable XP visual styles. There are pages in MSDN on how to do this. You can also add a manifest to the IDE itself if you want visual styles to take effect at design time, but I strongly recommend against it, since doing so actually alters your resource files to make them unreadable by most people.

The next version of .NET, due out in a few weeks, is mainly a bugfix release but contains a few nifty features, one of which is Application.EnableVisualStyles, which goes around the need to add a manifest entirely.
 
Thanks divil. Obviously UI development is not my strong suit, perhaps because of quirky things like this. Would have never guessed that I needed to add something to make my app look like the native style of the os.
 
It's a question of informing the OS to load a different version of the Common Controls library (version 6) than the version the program was compiled to use (version 5).
 
Back
Top