开发者

Why does my app appear to be using a Windows 95 GUI?

开发者 https://www.devze.com 2023-02-02 15:29 出处:网络
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 o

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号