[RESOLVED] Manifest file for XP buttons not working with executable
I am using Windows XP style buttons for my applciation, which requires a manifest file. Using a VB6.EXE.manifest file in my VB folder makes running the application from the code give my application an XP style look.
However, when I compile and try to run my application from an executable, I get a "run-time Error 7 Out of memory." Do you know what changes I would have to make to the manifest file to get this to work? My executable has a depency on a dll, though I'm not sure this should make any difference at all. My application runs fine from the executable (though without XP style buttons) without the manifest file in the application folder.
Thanks for your help!
Eliott
Re: Manifest file for XP buttons not working with executable
Are you making the call to InitCommonControlsEx? Post your startup code.
Re: Manifest file for XP buttons not working with executable
Calling InitCommonControls the first thing I do in Form_Initialize in my main form
Private Sub Form_Initialize()
Dim strTempString() As String
' Must call InitCommonControls in Form_Initialize. From_Load is too late
' This will ensure you get the XP-look under XP
InitCommonControls
........
End Sub
Re: Manifest file for XP buttons not working with executable
Its best to call it even earlier then form_initialize as the dform is already being created with initialize. Place the call in a module Sub Main. Then call your form from there after.
Re: Manifest file for XP buttons not working with executable
check your MANIFEST file size..!?!
It must be dividable by 4
**Add spaces to tweak file size..
1 Attachment(s)
Re: Manifest file for XP buttons not working with executable
Do it in a Sub Main. Here's a sample.
Re: Manifest file for XP buttons not working with executable
Also, make sure your buttons are not set to the Graphical Style as its not supported for XP Theming. ;)
Re: Manifest file for XP buttons not working with executable
Quote:
Originally Posted by RobDog888
Also, make sure your buttons are not set to the Graphical Style as its not supported for XP Theming. ;)
you mean like my commandbuttons? Or for my toolbar buttons?
Re: Manifest file for XP buttons not working with executable
Re: Manifest file for XP buttons not working with executable
Toolbar buttons dont have a graphical style ;)
Re: Manifest file for XP buttons not working with executable
Quote:
Originally Posted by RobDog888
Toolbar buttons dont have a graphical style ;)
Exactly... they are ment to be graphical :D
Re: Manifest file for XP buttons not working with executable
haha right... oops
I'll test it out later today and let you guys know. Thanks for all the input!
Re: Manifest file for XP buttons not working with executable
Problem: the VB6.exe.manifext file will only work in the IDE. You need to have a manifest file for your exe for it to work in your exe.
Look here for a project that shows the use of the manifest file http://www.***********/freeware.html Look for XP Manifest File
Re: Manifest file for XP buttons not working with executable
Quote:
Originally Posted by randem
Problem: the VB6.exe.manifext file will only work in the IDE. You need to have a manifest file for your exe for it to work in your exe.
Yes, I am aware of this. Sorry, I guess my post was worded funny. I will test out what the others suggested later in the day, I have a feeling that this whole problem may be coming from my command buttons. Thanks :)
Re: Manifest file for XP buttons not working with executable
Quote:
Originally Posted by RobDog888
Its best to call it even earlier then form_initialize as the dform is already being created with initialize. Place the call in a module Sub Main. Then call your form from there after.
This worked like a charm. Thank you!