以下 是我在Delphi Help 中找到的关于使用Version 6 XP 主题的方法,可是我试验后没有任何结果,这是为什么呢?另外我使用了XPManifest控件,也没有任何结果。还有ActionManager可以实现该功能,可是我不会,那位大虾能够教晚辈?补充一点,我的机器使用的是Windows 经典外观。
需要说明的是,我想在这里讨论不需要第三方控件实现XP外观的方法,所以提议使用第三方控件的请另开帖讨论。谢谢。
Microsoft has forked Windows common controls into two separate versions. Version 5 is available on all Windows versions from Windows 95 or later; it displays controls using a "3D chiseled" look. Version 6 became available with Windows XP. Under version 6, controls are rendered by a theme engine which matches the current Windows XP theme. If the user changes the theme, version 6 common controls will match the new theme automatically. You don't need to recompile the application.The VCL can now accommodate both types of common controls. Borland has added a number of components to the VCL to handle common control issues automatically and transparently. These components will be present in any VCL application you build. By default, any VCL applications will display version 5 common controls. To display version 6 controls, you (or your application's users) must add a manifest file to your application. A manifest file contains an XML list of dependencies for your application. The file itself shares the name of your application, with ".manifest" appended to the end. For example, if your project creates Project1.exe as its executable, its manifest file should be named Project1.exe.manifest. Here is an example of a manifest file:<?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="CompanyName.ProductName.YourApp"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>Use the example above to create a manifest file for your application. If you place your manifest file in the same directory as your application, its controls will be rendered using the common controls version 6 theme engine. Your application now supports Windows XP themes.For more information on Windows XP common controls, themes, and manifest files, consult Microsoft's online documentation.

解决方案 »

  1.   

    d6 的项目通过把这个xml资源添加进取就可以实在在xp下xp风格,但是很多控件还是原来的问题,比如TBitBtn,TGroupBox这些都有问题,所以我换成了D7。另外,d6下面使用这个xml 还有一个兼容的问题就是TImageList,它可能会报错,这个不兼容的问题(也可以算做BUG)已经证实了。
      

  2.   

    上面的文档是从D7的Help中拖出来的。D6没有
      

  3.   

    d7 还不简单,把控见面板win32 上面最后的winxp 拖到你的主窗体就行了
      

  4.   

    她本来就是只能在xp下才使用xp的风格,这是因为xp下有2个版本ComCtrl32.dll文件,一个是经典的,一个是xp风格。那个xml文件就是让他使用xp风格的那个。你想在经典界面下使用xp风格,除非自己画,否则没可能。另外 Additional 里面最后的那些控件也不是实现xp界面的,它只能部分得让菜单类似xp的风格。
      

  5.   

    D6下不知道,D7下可以把XPMan单元添加到工程文件的第一个使用单元中,就可以了。
      

  6.   

    如果在XP 界面下那我根本不需要指定使用Version 6了。哎,还是不明白。可是D7在经典界面下也实现了XP效果,难道他也是画的?
      

  7.   

    d7 的xp效果的菜单就是自己画的。