MSDN中关于这方面的介绍请看文章:
http://msdn.microsoft.com/library/index.asp?url=/library/en-us/dnwxp/html/xptheming.asp
文中对如何实现XP Style的解释是:
If you want your application to use visual styles, you must add an application manifest that indicates that ComCtl32.dll version 6 should be used if it is available. Version 6 includes some new controls and new options for other controls, but the biggest change is support for changing the appearance of controls in a window.
要想使用XP Style,最简单的办法是创建一个.manifest文件。文件必须与目标程序在同一个文件夹(例如你的工程的\bin文件夹),并且名字必须是
MyApp.exe.manifest,其中红色部分是你的程序文件名。文件的内容如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="X86"
文章来源于领测软件测试网 https://www.ltesting.net/