Hack90.Force Older Programs to Use XP Common Controls


Hack 90. 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 checkboxes. 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 titlebars. 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 10-1 shows the code to put in your manifest file. For Program Name, enter the name of the program, and for Description of Program, enter a description for the program.

Example 10-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 you want to force to use XP common controls. Give it the same name as the program's executable file, but with an extension of .manifest. For example, if the program's executable file is named oldprogram.exe, give the manifest file the name oldprogram.exe.manifest.

10.4.1. See Also

  • [Hack #89]



    Windows XP Hacks
    Windows XP Hacks, Second Edition
    ISBN: 0596009186
    EAN: 2147483647
    Year: 2003
    Pages: 191

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net