一个能让C#使用XP样式的方法

首先把 你想要应用XP样式的控件 的FlatStyle属性改为:"System"

第二步 假设你生成的应用程序的名字是 pro.exe 打开记事本把以下的代码复制过去:
<?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"
   name="Microsoft.Winweb.XPThemes"
   type="win32"
/>
<description>.NET control deployment tool</description>
<dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="X86"
       publicKeyToken="6595b64144ccf1df"
       language="*"
       />
    </dependentAssembly>
</dependency>
</assembly>
然后保存为pro.exe.manifest (pro是你应用程序的名字) 把这个文件和你的应用程序保存到一起运行以下看看效果吧{7}

posted @ 2011-12-13 06:37  软件吧  阅读(403)  评论(0编辑  收藏  举报