Force Older Programs to Use XP Common Controls
Older Windows programs look ancient and outdated in XP, because they don’t use the newer-style buttons and check boxes. Here’s how to make them use XP common controls.
When you run an older program in XP, the operating system applies an XP-type frame around it, with rounded title bars. But the older program itself still uses its older style interface. You can, however, force older programs to use XP-type common controls for things such as checkboxes and buttons. You’ll have to create a manifest file (a specifically formatted XML file) and place it in the same directory as the older file.
Example 9-1 shows the code to put in your manifest file. For
Description of Program, enter a
description for the program, and for Program Name, enter the name of the program.
Example 9-1. Creating 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="Program Name"
type="win32"
/>
<description>Description of Program</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>To create the file, open Notepad, copy the text into it, and save it to the same folder as the executable file of the program ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access