Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Manifest Doesn't Work

0 views
Skip to first unread message

Rick Raisley

unread,
Oct 8, 2008, 9:47:06 AM10/8/08
to
I think I remember something about this, but after just getting out of the
hospital, my brain doesn't seem to be working properly (yes, I'm going to
use that excuse).

I've been using manifest files on a number of apps, which appear to work
fine. But I just tried copying one for use on another app, written, compiled
and being run on WinXP, and when starting the app, I just get a big "beep",
and nothing appears. As mentioned above, I think I remember something about
that, but can't seem to find it (or remember specifics). This is my manifest
file:

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

Any idea what I'm missing?

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net


Wolfgang Enzinger

unread,
Oct 8, 2008, 10:01:51 AM10/8/08
to
On Wed, 8 Oct 2008 09:47:06 -0400, "Rick Raisley" wrote:

>I've been using manifest files on a number of apps, which appear to work
>fine. But I just tried copying one for use on another app, written, compiled
>and being run on WinXP, and when starting the app, I just get a big "beep",
>and nothing appears. As mentioned above, I think I remember something about
>that, but can't seem to find it (or remember specifics).

I seem to remember that the manifest file size must be a multiple of 4
for unknown reasons ... add some spaces if needed.

HTH,
Wolfgang

Rick Raisley

unread,
Oct 8, 2008, 10:24:13 AM10/8/08
to
"Wolfgang Enzinger" <weus...@temporaryforwarding.com> wrote in message
news:87fpe4d268qkvm773...@4ax.com...

Thanks, but that didn't do it. I'm thinking the multiple of 4 rule only
applies for embedded manifest files; I'm using an external one.

Wolfgang Enzinger

unread,
Oct 8, 2008, 10:44:19 AM10/8/08
to
On Wed, 8 Oct 2008 10:24:13 -0400, "Rick Raisley" wrote:

>> I seem to remember that the manifest file size must be a multiple of 4
>> for unknown reasons ... add some spaces if needed.
>>
>
>Thanks, but that didn't do it. I'm thinking the multiple of 4 rule only
>applies for embedded manifest files;

true

>I'm using an external one.

My bad, should have noticed that.

More ideas:
* Is the Version info in the manifest file the same as in the EXE? I
read domewhere that this can cause problems, however I never could
reproduce them.
* Do you call InitCommonControls immediately after the program starts?

Wolfgang

Rick Raisley

unread,
Oct 8, 2008, 11:54:02 AM10/8/08
to
"Wolfgang Enzinger" <weus...@temporaryforwarding.com> wrote in message
news:qkhpe4hgns9gep8se...@4ax.com...

> On Wed, 8 Oct 2008 10:24:13 -0400, "Rick Raisley" wrote:
>
>>> I seem to remember that the manifest file size must be a multiple of 4
>>> for unknown reasons ... add some spaces if needed.
>>>
>>
>>Thanks, but that didn't do it. I'm thinking the multiple of 4 rule only
>>applies for embedded manifest files;
>
> true
>
>>I'm using an external one.
>
> My bad, should have noticed that.
>
> More ideas:
> * Is the Version info in the manifest file the same as in the EXE? I
> read domewhere that this can cause problems, however I never could
> reproduce them.

I don't think the actual text in the manifest describing the program is
actually used anywhere.

> * Do you call InitCommonControls immediately after the program starts?
>

No, forgot about that. I'm pretty sure that's it, at least it rings a bell.
IIRC, some programs worked fine without that, while others didn't. Thanks
for jogging my memory; I'll add it and see what happens then.

Randy Birch

unread,
Oct 8, 2008, 1:18:59 PM10/8/08
to
Sometimes vb may call initcommoncontrols itself; but to be sure it's called,
you should put it somewhere prior to any forms being loaded. On vista this
has to be a bas module, from my testing. On xp, the initiate event of the
form is OK too. You don't have to worry about "calling it too many times"
.. use it by default in all projects, and you'll be assured it works.

--

Randy Birch
ms mvp - visual basic
http://vbnet.mvps.org/

"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:%23c1NX4V...@TK2MSFTNGP05.phx.gbl...

PeterD

unread,
Oct 8, 2008, 2:57:19 PM10/8/08
to
On Wed, 8 Oct 2008 09:47:06 -0400, "Rick Raisley"
<heavymetal-A-T-bellsouth-D-O-Tnet> wrote:

>I think I remember something about this, but after just getting out of the
>hospital, my brain doesn't seem to be working properly (yes, I'm going to
>use that excuse).
>
>I've been using manifest files on a number of apps, which appear to work
>fine. But I just tried copying one for use on another app, written, compiled
>and being run on WinXP, and when starting the app, I just get a big "beep",
>and nothing appears. As mentioned above, I think I remember something about
>that, but can't seem to find it (or remember specifics). This is my manifest
>file:
>

First have you tried this on Vista? Vista will (about the only thing
it will do properly) generate event log information that may give you
a clue to what is going wrong. XP just won't do anything other than
fail to run.

Kevin Provance

unread,
Oct 8, 2008, 3:58:27 PM10/8/08
to
That's not altogether true. XP after SP2 is better about event logging
misplaced XML in manifests. Not as well as Server 2003. :-)

I think, after having dealt with this time and time again that is has to do
with the call to Init the common controls not being present in the
executable itself.

- Kev

"PeterD" <pet...@hipson.net> wrote in message
news:rh0qe4tnods4lrmbo...@4ax.com...

Karl E. Peterson

unread,
Oct 8, 2008, 7:56:10 PM10/8/08
to
Rick Raisley wrote:
> I think I remember something about this, but after just getting out of the
> hospital, my brain doesn't seem to be working properly (yes, I'm going to
> use that excuse).

Don't feel bad...

Seriously OT: http://www.youtube.com/watch?v=JYFm5kK4f1k
--
.NET: It's About Trust!
http://vfred.mvps.org


Rick Raisley

unread,
Oct 9, 2008, 1:40:58 PM10/9/08
to
In a BAS module with Vista, huh? If I'm not using Sub Main, would I just
call a sub from the Form's event, or is that no different?

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net

"Randy Birch" <rgb_rem...@mvps.org> wrote in message
news:uACL0nWK...@TK2MSFTNGP05.phx.gbl...

Kevin Provance

unread,
Oct 9, 2008, 1:55:45 PM10/9/08
to
You can use a form, but it cannot be in Form_Main, it has to be in
Form_Initialize as this is called before the controls are created.

- Kev

"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message

news:%23svNxYj...@TK2MSFTNGP04.phx.gbl...

Steve Easton

unread,
Oct 9, 2008, 1:49:47 PM10/9/08
to

It has to be in sub main because it has to initialize "before" the form loads.

The following courtesy of Randy Birch:
--
Steve Easton

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

"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message

news:%23svNxYj...@TK2MSFTNGP04.phx.gbl...

Randy Birch

unread,
Oct 9, 2008, 3:07:13 PM10/9/08
to
I found in testing that under vista initialize was too late, so recommend
adding a sub main to call initcc before showing the form, even if that's all
sub main does.

--

Randy Birch
ms mvp - visual basic
http://vbnet.mvps.org/

"Kevin Provance" <kevin@remove_tpasoft_remove.com> wrote in message
news:uAGSBhjK...@TK2MSFTNGP04.phx.gbl...

Rick Raisley

unread,
Oct 9, 2008, 4:18:11 PM10/9/08
to
Thanks all for the info. That was, indeed, the problem.

I notice, however, that when using the Graphical style of OptionButtons that
they are not updated to the XP look as are CommandButtons, which look the
same but operate differently. (Actually, the Graphical style of any button
seems to not be updated.) Any easy answer to that? I prefer their button
look in this case to the standard ones.

--
Regards,

Rick Raisley
heavymetal-A-T-bellsouth-D-O-T-net

"Randy Birch" <rgb_rem...@mvps.org> wrote in message

news:OA239IkK...@TK2MSFTNGP02.phx.gbl...

Ken Halter

unread,
Oct 9, 2008, 10:09:02 PM10/9/08
to
"Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message
news:uQGtmwkK...@TK2MSFTNGP04.phx.gbl...

> Thanks all for the info. That was, indeed, the problem.
>
> I notice, however, that when using the Graphical style of OptionButtons
> that they are not updated to the XP look as are CommandButtons, which look
> the same but operate differently. (Actually, the Graphical style of any
> button seems to not be updated.) Any easy answer to that? I prefer their
> button look in this case to the standard ones.

INFO: Visual Basic 6.0 Does Not Support Windows XP Themes or Visual Styles
http://support.microsoft.com/kb/309366/en-us

Option buttons must be in a container that exposes an hdc property... and
all bets are off when their style is set to Graphical.

There are replacements available on PlanetSourceCode.com and/or you can
create your own option button/checkbox controls.

0 new messages