Why do my forms look like 'Windows Classic'?
Asked Answered
S

1

20

Is there any free tool to style my C# Windows Forms, to make them look like Windows 7 Windows.

**EDIT**

In the designer mode, I have this :

enter image description here

But when I run I get this :

enter image description here

I don't know why I get that. (Old style)

Thanks

Slovakia answered 24/6, 2011 at 10:2 Comment(8)
I don't care for your -1 sir, so if you have something to say, just say it.Slovakia
There is one non-free tool around. (-1 isn't mine)Vintner
aren't they (WinForms) being "skinned" by default depending on user's Windows Version? Or do you want them to look like Win7 in, for example, WinXP?Pleonasm
I'm so confused, because I'm running the APP in Win 7, but I get the old windows styleSlovakia
nice screenshots, i gave you +1, you deserve it for not letting WinForms die ( :Pleonasm
Thanks, but you know why I'm getting this in output !!Slovakia
This doesn't deserve down votes, but the question should be rephrased to be something like: Why do my forms look like 'Windows Classic'?Pearlypearman
+1 Always try to ask clear questionsUnlicensed
U
41

You should enable visual styles

look Application.EnableVisualStyles Method

Call this method before creating any controls

[STAThread]
static void Main() 
{
    Application.EnableVisualStyles();
    Application.Run(new YourMainForm());
}
Unlicensed answered 24/6, 2011 at 10:14 Comment(3)
God knows why this isn't the default! :)Pearlypearman
@Jacob... I thought that was the default for a winforms app... I could be wrong though :)Redcap
Maybe it is default when building stuff in Visual Studio, but I was building with WinForms using Python for .NET and couldn't figure this out! Thank you :)Thorny

© 2022 - 2024 — McMap. All rights reserved.