Search code examples
user-interfacedelphithemesmanifestdelphi-7

Turn off theme for Delphi 7 application


I had to fix something in a 20-years-old Delphi 7 application. After the fix, I thought I would improve the application by fixing the GUI theme, so I dropped the XPManifest component on the main form. Although this gave most controls a better look, there were some problems. For example, there are checkboxes and radio buttons with yellow text on blue background (blargh), and the black text color set by the theme rendered their labels unreadable. So I decided to delete the XPManifest component and rebuild the program to get back the original look.

Interestingly, the GUI theme remained after deleting XPManifest and recompiling the exe. I checked the DFM, and the XPManifest is really not in there. How can I fix this?


Solution

  • All the component does is add a unit to the uses clause, XPMan IIRC, that links a resource file enabling themes. Remove that unit from the uses clause to revert the behaviour.

    This is a clear indication of the value of revision control.