Re: Manifest file as a custom resource.
- From: "Steve Easton" <admin@xxxxxxxxxxxxx>
- Date: Mon, 5 Feb 2007 08:39:12 -0500
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.
.
- Follow-Ups:
- Re: Manifest file as a custom resource.
- From: Jim Carlock
- Re: Manifest file as a custom resource.
- References:
- Manifest file as a custom resource.
- From: Steve Easton
- Re: Manifest file as a custom resource.
- From: DanS
- Re: Manifest file as a custom resource.
- From: Steve Easton
- Re: Manifest file as a custom resource.
- From: DanS
- Re: Manifest file as a custom resource.
- From: Steve Easton
- Re: Manifest file as a custom resource.
- From: DanS
- Re: Manifest file as a custom resource.
- From: Jim Carlock
- Manifest file as a custom resource.
- Prev by Date: Re: Retrieving Font Size in Twips??
- Next by Date: Re: How Can I Find My VB Source Code On My Computer?
- Previous by thread: Re: Manifest file as a custom resource.
- Next by thread: Re: Manifest file as a custom resource.
- Index(es):
Relevant Pages
|
Loading