tags:

views:

1075

answers:

3

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?

+4  A: 

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.

_J_
+7  A: 

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.

shunty
A: 

Just add the unit XPMan to the Uses list.

Demman CRUISE
dragging the xpman component to the main form was the easiest way to get the controls to re-skin. just having the enable runtimes themes didn't seem to be enough to get my basic "hello world" app to give aero style looks on win7. thanks for this tip.
MikeJ
This is now considered "out of date". For old versions of Delphi this will work. "Enable runtime themes" as shown above, or use the Manifest answer shown by Shunty.
Warren P