C# Forms - Visual appearance

Associate
Joined
25 Jul 2003
Posts
1,980
Quick question:

When in design mode my forms look 'nice'. The buttons are shaded and the their edges are rounded. When I actually compile the programs all the buttons are square and unshaded.

Anyone know whats going on?!

I'm using Visual Studio 2005 and Vista
 
VisualStyles are Disabled. I know in VB.NET you can turn this on and off under the properties view but in C# there's probably some more arcane way of doing it lol
 
There might be an option somewhere that affects this. However I am not 100% sure as I have never had an issue. Although I've never used it on Vista.
 
Default in C# in Vista VS2005 seems to be on so not sure how you got them off. ANyways for c# you want


using System;
using System.Drawing;
using System.Windows.Forms;

namespace VStyles
{
public class Form1 : System.Windows.Forms.Form
{

private System.Windows.Forms.Button button1;

[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
 
Thanks pink.

Inquisitor said:
If you want the full Vista visual effects, you'll need to look at using WPF.

Its only a config window for a 3D application, so there is no need for such effects.
 
Back
Top Bottom