Link to home
Start Free TrialLog in
Avatar of odissey1
odissey1

asked on

D7: Disable XP manifest (XPman) support at run-time

Hi Experts,

Under WinXP I use XP manifest to enable fancy buttons and borders on TEdit/ TListView/.. in my program. So I just add to the uses clause (uses ...XPman;) Unfortunately, it comes with a pice: there are several known comctl32.dll - related bugs that come with using XPman.pas For example: scroll bars style = flat does not work any more (they are either blue or standard gray bricks).
 
If running my program on Win2K machine I don't need XPman any more (and all problems that come with it) , and I recompile my program without <uses ..XPman>. This leaves me with 2 version of same programm for WinXP and Win2K OS's which is sad.

Q. Is there any way to get rid of XPman support in a run-time (say, if running on Win2K machine)?

Sincerely,
odissey1
ASKER CERTIFIED SOLUTION
Avatar of Robn
Robn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of odissey1
odissey1

ASKER

Hi Rob,

Thank you for comment and suggestion. I need some time to experiment with it.
My concern with your approch is the same like using <uses ...XPman>. Supposedly, XP manifest does not do anything in Win2k. Unfortunately, this is not the case. If XPman is present (anywhere) in the program running in Win2k, it does affect general outlook. It should not, but it does  - this is comctl32.dll bug.

Example: put a ListView on a form and set scrool bar style  to Flat, run it on Win2k -- scroll bar is flat. Now add <uses ...XPman> and run it again -- scroll bar is 3D brick. And this is just very innocent bug, others are much worse.

Maybe there are some other approaches to my problem?
My problem is that my application works fine both in Win2K and WinXP without <uses ..XPman>. Of course, all controls are pained standard windows gray-brick style. It would be nice to enable somehow fancy buttons/combos etc. if application was started in WinXP. But how to do this?  

Sincerely,
Boris
P.S. I am adding extra 50 points since the question seems to be tough.
My approach is different because XPMan links the resource into the application. My solution allows you to remove this file from the folder if you are having problems with the application or you want to install it to an OS other than XP. You could have your install script test for XP and if it is, then copy the manifest file into the folder.

Regards,
Rob
Hi Rob,

Thank you for help. Since there are no any other comments on the subject I consider this is the way to go.

Sincerely,
Boris
Glad I could help
Regards,
Rob