XP enable your Delphi application

Por: Pan Rumburaku

Resumen: How to enable the XP control styles in your application

XP enable your Delphi application

The following applies only if you run your application in Windows XP environnement. The procedure below was tested in Delphi 6.

Step 1:

Load your project, myproj.dpr

Step 2:

Create a xml file "myproj.exe.manifest" containing the following lines:

<?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>My XP App.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>"


Step 3:

Create a rc file "xp.rc" containing:

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "myproj.exe.manifest"

Step 4:

Add the rc file to your project

Step 5:

Rebuild and run your application. Look at the buttons, comboboxes, lists, etc.



 


Respuesta del Servidor desde: ETNASC02