>CubicDesign wrote:
>
>Do you mean that XPMan is not compatible with Vista?

XPMan is for XP only as far as I can determine, although it doesn't 
seem to do any harm under Win2000 or WinNT4.

A program using it under Vista may show loss of colors in 
buttons/toolbars/dialog boxes and other problems.  Removing XPman 
from the source solves the problem for Vista, but doesn't offer the 
XP look under XP.

My solution is not the simplest, but it works reliably:

Copy "sample.manifest" from the D7 source\vcl  or source\win32\vcl 
directory in later versions and change the name of the copy to 
app.exe.manifest where app is the name of the exe file of your 
application.  It must be placed on the application directory where 
the exe is installed, either by  hand or with an installer.

Remove XPman from the uses clause in any windows where you may have 
dropped it and remove the XPman button from those windows.  When the 
application starts, it will hopefully find and use app.exe.manifest 
as if XPman was still in the uses clause.

Unfortunately, the exe also finds it under Vista, so the manifest 
file must be erased when the application starts for the first time, 
or if you have an installer which can run a dll, you can erase it 
after the installer copies it if you don't detect XP as the OS or not 
copy it in the first place if your installer recognizes the operating 
system before the file copy phase.

Detecting XP needs only an API call to GetOSVersionEx to place its 
result in a local variable:

var OS: TOSVersionInfo,

OS := GetVersionInfoEx;

and check to see if OS.dwMajorVersion  = 5, and OS.MinorVersion is 1 
for XP 32 bit, or 2 for XP 64bit.

Unhappily, this technique does not detect the difference between 
Vista x32 and x64, where both give 6.0 as a result. It also doesn't 
deal with problems when compatibility modes are used.
To differentiate between them, you have to look for an x64 specific 
file.  See the extensive discussion at:

http://17slon.com/blogs/gabr/2007/02/four-ways-to-detect-vista.html

The problem gets quite messy if the exec is running under one of the 
Vista compatibility modes.

Irwin Scollar 

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to