[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2003-11-13
5
Medium Priority
?
1,255 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:odissey1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
Robn earned 600 total points
ID: 9747624
Win2K doesn't load the manifest file and it doesn't come with the themed controls like WinXP does.
If you want to be able to turn off this support in WinXP, stop using XPMan and create your own manifest file. This file is XML and if you name it the same name as your executable, WinXP will load the manifest. If you experience a lot of problems in your application because of this, remove the file from the folder or rename it and Windows will not theme the controls when your application starts again.

The file should be named myapp.exe.manifest

Here are the contents (you can tweak these values to better suit your application.

<?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="Microsoft.VB6.VBnetStyles"
   type="win32"
/>
<description>myapp</description>
<dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="X86"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
</dependency>
</assembly>

Hope this helps,
Rob
0
 
LVL 2

Author Comment

by:odissey1
ID: 9750510
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.
0
 
LVL 2

Expert Comment

by:Robn
ID: 9750671
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
0
 
LVL 2

Author Comment

by:odissey1
ID: 9769427
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
0
 
LVL 2

Expert Comment

by:Robn
ID: 9787553
Glad I could help
Regards,
Rob
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question