So there were 2 ways you can get around this. Number 1 is a bit more effort, but it involves making a .exe.manifest file with the same name as your executable. In this manifest file you have some XML (http://www.dotnet247.com/247reference/msgs/15/79151.aspx, or http://www.codeproject.com/KB/cs/xpstyleui.aspx) which dictates how the controls appear. Then you have to change the "FlatStyle" property of each supported control to System.
That's great, it worked well, but it was fucking complicated.
Number 2 is much better. Call Application.EnableVisualStyles() before you launch the form. In my case, I called it before the parent MDI container was launched, and it fixed every internal form as well.
And no having to change each control's style separately.[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
No comments:
Post a Comment