简体   繁体   中英

Delphi - Windows Aero resources

Anyone have any good resources for Delphi and Windows Aero on 7 or Vista?

We're just about to add Windows 7 to our company and want to make sure that our in-house applications use fit in as well as possible.

Using Delphi 2010 I can add the Glass Frame and the menu bar inherits an Aero look, however the TabControls, Grids and Status bars all stick out as being outdated.

Any help?

We include our own manifest resource because, as far as I am aware, Delphi doesn't include the new manifest additions for Windows 7 (and Vista?). With help from http://msdn.microsoft.com/en-us/library/dd371711(VS.85).aspx and here and here :

Create a file "mymanifest.rc" with the single line

1 24 "my.manifest"

and create a file as below called my.manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity type="win32" name="OUR COMPANY NAME" version="3.1.0.0" processorArchitecture="*"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
        </requestedPrivileges>
    </security>
  </trustInfo>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!--The ID below indicates application support for Windows Vista -->
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
      <!--The ID below indicates application support for Windows 7 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
    </application>
  </compatibility>
</assembly>

Then add the mymanifest.rc to your project and turn off the 'enable runtime themes' option as this does the same thing (but less flexible). The 'requestedExecutionLevel' section can be altered to suit the UAC needs of the app.

Works for us.

I agree that using the Enable Runtime Themes project option should make most controls theme-aware.

TMS Components are always being updated to include the latest themes, including Windows 7, and Raize Components allow you to make use of transparency, gradients and theme-aware colours.

只需将单位XPMan添加到Uses列表中即可。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM