Click to See Complete Forum and Search --> : C# applications can't use XP style control?


Sin Jeong-hun
September 9th, 2002, 05:38 AM
Buttons always look in the old style. Is it also true in your computers or just my computer went crazy?

http://home.megapass.co.kr/~explorer1980/x.jpg


public class x
{
public static void Main()
{
System.Windows.Forms.Application.Run(new xx());
}
}
public class xx:System.Windows.Forms.Form
{
System.Windows.Forms.Button xxx=new System.Windows.Forms.Button();
public xx()
{
xxx.Location=new System.Drawing.Point(100,100);
xxx.Text="XP?";
this.Controls.Add(xxx);
}
}


I've created a "FILENAME.manifest" file, but the button still looks in the old style.
http://home.megapass.co.kr/~explorer1980/y.jpg

Please let me know if my computer went crazy. I'll reinstall .NET Framework or even Windows.

Sin Jeong-hun
September 9th, 2002, 06:27 AM
It was simeple. I found it on the internet.

The solution is,

Set control's FlatStyle property to System.

That's all.

I found this at
http://www.c-sharpcorner.com/Code/2002/June/DevelopXPStyleApps.asp