|
-
Jun 26th, 2007, 02:28 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Embed manifest into exe?
Is it possible to embed a manifest file into your project so when I compile it the manifest is also in the project? This is the code for the manifest (makes the program use xp style)
Code:
<?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="Microsoft.VB6.VBnetStyles"
type="win32"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
-
Jun 26th, 2007, 02:32 PM
#2
Re: Embed manifest into exe?
-
Jun 26th, 2007, 02:45 PM
#3
Thread Starter
Addicted Member
Re: Embed manifest into exe?
Thats not what I mean, I don't want to have to send the manifest with the exe.
-
Jun 26th, 2007, 02:46 PM
#4
Re: Embed manifest into exe?
-
Jun 26th, 2007, 03:11 PM
#5
Re: Embed manifest into exe?
The easiest way is probably using Resource Hacker.
Save the xml above to a text file.
Add the follwing code to your form.
vb Code:
Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
Private Sub Form_Initialize()
InitCommonControls
End Sub
Start Resource Hacker
Open the executable.
Go to 'Action' -> 'Add a new resource' and select the text file
Add the following numbers: 24, 1, 1301 and click the 'Add Resource' button.
Go to 'File' -> 'Save as...' and save it.
Last edited by Chris001; Jun 26th, 2007 at 03:16 PM.
-
Jun 26th, 2007, 03:39 PM
#6
Thread Starter
Addicted Member
Re: Embed manifest into exe?
Thanks
-
Jun 26th, 2007, 03:40 PM
#7
Re: [RESOLVED] Embed manifest into exe?
I'll give you an option to create the manifest file to a different folder and once you've exited your application, the manifest file is also deleted. You'll create your manifest file once you started your app. I dunno if it'll work.
-
Jun 26th, 2007, 07:39 PM
#8
Re: [RESOLVED] Embed manifest into exe?
iamme2007,
So what do you mean? In that app you did not have to send the manifest file is was created at runtime. What exactly were you looking at????
-
Jun 27th, 2007, 06:53 AM
#9
Re: [RESOLVED] Embed manifest into exe?
There is no need to create it at runtime - it can be simply be embedded into the executable itself, as described at the link I provided.
-
Jun 27th, 2007, 02:18 PM
#10
Re: [RESOLVED] Embed manifest into exe?
Hmmm... I was lead to believe that VB6 could not use the Manifest file as a resource in that manner because of the was VB6 handles resources, It could only be done in VB.Net. I will try it and see what happens.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|