I have a program that I am working on. And for some reason, every component when run looks like it's from Windows 95. Is开发者_如何学JAVA there a way to update this to something more modern? All my other programs use a current looking GUI.
Edit: Here is the solution for a C# application:
Application.EnableVisualStyles();
Application.DoEvents();
You need to add a manifest file that allows the use of comctl32.dll in version 6 and newer. This is usually done automatically when you create a GUI project in Visual Studio. In other IDEs, there are often similar menu options (e.g. Code::Blocks "WinXP Look'n'Feel" plugin) so that you don't have to write such a file yourself (which isn't very hard, mostly copy-paste from the link above).
The file must be named "something.exe.manifest".
It could be that you need to add an application manifest to enable Windows XP+ visual styles.
精彩评论