Adam.
Bingo. As I understand it, the manifest tells Windows XP that the
program can be shown with the Windows XP skin.
Cheers,
Nicholas Sherlock
The component itself doesn't do anything at all. Take a look at the
source code. The unit is nearly empty. What you'll see in that unit,
though, is something you won't see in most other units. It has a $R
directive to include a resource file. That resource file contains a
manifest, so when your program uses that unit, the manifest resource is
linked to your program.
When Windows XP loads your program, it detects that resource and changes
its behavior accordingly. The manifest tells the OS which version of the
Common Controls library to use. By default, the OS will use version 5,
which does not do any theming. The manifest requests version 6, which is
where all the themed drawing takes place.
When you place a component on a form, the IDE automatically adds that
component's unit to the form unit's "uses" clause. The TXPManifest
component simply takes advantage of that behavior. Add that component to
a form, and the necessary unit gets used. The unit drags in the resource.
Note that removing the component does _not_ remove the resource. That's
because the IDE does not automatically remove units the same way it adds
them. If you added a TXPManifest component and later deleted it, you'll
need to remove mention of the XPManifest unit yourself.
> (under windows 2000 anyway). Perhaps it only functions
> under XP?
Well, duh.
--
Rob
Thanks anyway though :)
Adam.
it works under XP. and it only places a
script in the Resource file which signals
XP about how to draw the window controls.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5