|
-
Apr 9th, 2017, 03:34 PM
#4
Embedded vs. External Manifests
Pretty much external manifests are history. These manifests are external files with the same name as your application and appending a .manifest extension. The reason why they are becoming history is that any embedded manifest will take priority unless certain registry keys are changed.
To embed a manifest in VB6 project, you can use a tool like the one here or you can create an external manifest and add it to your resource file, in the CUSTOM section. Once added, double click on it and change the Type Field to: #24 and change the Id Field to: 1. Tip: Those can be manually extracted by opening the RES file in NotePad.
If you want your VB6.exe to use an external manifest, unless you plan on using some 3rd party software to embed one into the exe (and hope it doesn't corrupt it), some annoyances are expected. Simply adding an external manifest along side of VB6.exe doesn't guarantee it will be used. You may very well need to change a registry setting to make it happen. After you are sure your manifest is being recognized, you will likely want to go and restore the setting:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide
Value: PreferExternalManifest
Data: 1 = prefer, 0 = don't prefer After making the change and manifest still appears to not take effect, reboot. It is getting harder and harder to use external manifests within Windows -- and that's probably not a bad thing.
In post #56, page 2, an example of using mt.exe is shown for editing your VB6.exe to insert a manifest.
Here is another way of manifesting the IDE without permanently modifying the VB6.exe file.
1. Create an external manifest. Make it perfect, exactly how you need it
2. Copy the manifest into your VB6.exe folder and name it VB6themed.exe.manifest
3. Now copy your VB6.exe and rename the copy: VB6themed.exe
Now run the new VB6themed.exe. The idea is that since the executable hasn't yet run, it should pick up the manifest the first time.
If that worked, and you later need to change the manifest, you still may have to jump through hoops. You could always repeat the above 3 steps using a different name. If playing with DPI awareness, you may want to create a couple different versions, where maybe one is system DPI aware, one is per-monitor DPI aware, etc.
Last edited by LaVolpe; Apr 21st, 2020 at 04:31 PM.
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
|