Irwin Scollar wrote: > Better still, is there a way to switch off XP Themes simply when the > WinAPI GetVersionEx reports OS major version 6 for Vista and to turn > them back on when it reports 5 or less. > > Are there other known problems like this under Vista with Delphi 7 or later? > > Irwin Scollar > Having your own program enable/disable themes based on the result of GetVersionEx implies having an working program on the target system. This is a bit of a problem since the Common Controls library is usually loaded before your program starts (ie: it's not dynamically loaded at a later time). So by the time you may call GetVersionEx the common controls library version 7 has allready been linked to your program.
There a few ways to solve your problem. I'll enumerate a few: (1) Use an EXTERNAL Manifest (search MSDN or Google for ways to generate this external Manifest). Since the manifest is not part of your exe you may use a single version of your exe and "change" it's ability to show theems or not by adding/removing the given manifest. Unfortunatelly adding/removing this manifest can't be done from the exe itself, but it can be done from the installer. (2) Use two versions of the EXE + a loader. Easy to do if you build your installation disks with a script. (3) An API for enabling/disabling theems for a given window exists. Using it might be a bit of a pain BUT it should work fine. MSDN and Google might help. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

