Re: XPManifest



AdamMaynard24 wrote:
What exactly does XPManifest do? There's no help on it, and it doesn't
seem to have any interesting properties or change the look of my
application.

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
.



Relevant Pages

  • Re: Manifest file as a custom resource.
    ... I've got the standard manifest file part figured out, and even the part when you ... As a resource, you add it as a custom resource and in resource editor it sould display as 24> 1 ... out of the Classic Theme to test things out. ...
    (microsoft.public.vb.general.discussion)
  • Re: XP-Style Theme
    ... Under XP, if there is a manifest with the same name as the exe, Windows ... InitCommonControls), the exe will fail in any number of manners, none ... :>> How can I go about creating a Resource file myself -- none of my VB ...
    (microsoft.public.vb.general.discussion)
  • RE: Windows Installer removes embedded resource manifest ?
    ... The built deployment project never got the modified ... ..EXE file. ... echo %INPUT% manifest resource NOT applied to %BINOUTPUT% ... embedding the necessary .manifest resource as you suggest. ...
    (microsoft.public.vsnet.general)
  • Re: Generating an application manifest with a trust level section
    ... genearate a crash dump. ... If I include the manifest he ... I had narrowed it down to the <security> tag. ... you can either edit the resource directly after ...
    (microsoft.public.dotnet.languages.vc)
  • RE: Windows Installer removes embedded resource manifest ?
    ... will need to embed an manifest file in the win32 resource collection. ... you found the res manifest occur in the built exe but disappear ... Since you said you have to use the "Post Build" event to inject the win32 ...
    (microsoft.public.vsnet.general)