Re: Manifest file as a custom resource.



Hi Jim,

Yes, the machine has to running in XP style.
I've got the standard manifest file part figured out, and even the part when you
make it a resource.
As a resource, you add it as a custom resource and in resource editor it sould display as 24 > 1
at the top of the resource list.
My thoughts are that the resource needs to be called in the sub main routine that references / sets the XP
common controls dll which is done as follows: ( the following uses the external manifest file )

Option Explicit

Public Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Public Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Public Const ICC_USEREX_CLASSES = &H200

Public Sub Main()

' we need to call InitCommonControls before we
' can use XP visual styles. Here I'm using
' InitCommonControlsEx, which is the extended
' version provided in v4.72 upwards (you need
' v6.00 or higher to get XP styles)
On Error Resume Next
' this will fail if Comctl not available
' - unlikely now though!
Dim iccex As tagInitCommonControlsEx
With iccex
.lngSize = LenB(iccex)
.lngICC = ICC_USEREX_CLASSES
End With
InitCommonControlsEx iccex

' now start the application
On Error GoTo 0
Form1.Show

End Sub




--
Steve Easton






Still though, when compiled the executable will not recognize it.

"Jim Carlock" <anonymous@localhost> wrote in message news:OXW6DuKSHHA.600@xxxxxxxxxxxxxxxxxxxxxxx
"Steve Easton" <admin@xxxxxxxxxxxxx> wrote:
: If I'm going to do that I just might as well distribute the manifest
: file. I want to call it from a resource that's compiled within the
: executable.

I toyed around with this before in the past. I currently cannot break
out of the Classic Theme to test things out. I think I deleted all the
extra themes to recover some disk space.

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

From what I recall...

(1)
appname in the manifest above needs to get changed to the
name of the application.

(2)
When inserting that as a custom resource, I believe you need
to make it the FIRST resource id in the file (something like 101).

I can't test things out at this moment, so I'll await your reply to
let me know if you get it working.

I also believe that the system must be in another Theme other
than the Classic theme in order for any manifest to work, but
await some extra confirmation from others before taking it as
a factual statement.

Let us know if this helps out at all.

--
Jim Carlock
Post replies to the group.




.



Relevant Pages

  • Re: Manifest file as a custom resource.
    ... If I'm going to do that I just might as well distribute the manifest ... I want to call it from a resource that's compiled within the ... out of the Classic Theme to test things out. ... I can't test things out at this moment, so I'll await your reply to ...
    (microsoft.public.vb.general.discussion)
  • Re: XP Look and feel in VSC#.NET
    ... Add the manifest file as a "resource" to your project. ... >> The manifest must be in the folder of the exe, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Any tips on how to make a form look more "up-to-date?
    ... For apps running under WinXP, you can include a manifest file. ... See Randy's site that explain how to use a manifest file. ... The work-around is to place a picturebox on the frame and then place your controls inside the picturebox. ... Another alternative to a separate manifest file is to include it as a resource in your compiled EXE. ...
    (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: Running VB6 exe on Windows 7 64bit
    ... I've Googled around and discovered what data needs to go into the manifest to signify that your app is dpi-aware, but I don't know how to embed the manifest into the compiled VB exe file as MMM can do with its RegFree COM manifests. ... The manifest file has to be embedded as a resource into the exe. ... Basically the .rc file among other things can tell the resource compiler which files to include in the compiled resource file. ... In the meantime perhaps Google (eg. "Resource file for embedding manifests") could help. ...
    (microsoft.public.vb.general.discussion)

Loading