Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 83

Thread: [VB6] Manifest Creator II

  1. #41

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Bug found when toggling TrustInfo between namespaces v2 and v3. Fixed.

    Additionally. As mentioned in post #21. It is possible to get two TrustInfo entries if merging multiple manifests, one using v2 and one using v3, depending if v2 exists in the selected manifest. Also mentioned in that post, you can simply unselect the one you don't want. When selecting the menu to toggle the namespace and 2 or more TrustInfo elements exist, the first element is the one that gets toggled. At that time, the others will be flagged so you can delete them via the tree node's context menu (right click)
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #42
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [VB6] Manifest Creator II

    thanks for the update

    EDIT:
    I noticed in your .vbp, you're using COMCTL32.OCX v1.3
    is that version bound to OS ? I got 1.4 on Win7
    Last edited by VbNetMatrix; Nov 1st, 2017 at 01:45 AM.

  3. #43
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,253

    Re: [VB6] Manifest Creator II

    Thanks for your great work on this, LaVolpe
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  4. #44

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by VbNetMatrix View Post
    I noticed in your .vbp, you're using COMCTL32.OCX v1.3
    is that version bound to OS ? I got 1.4 on Win7
    Yep, chose the v5 common controls so it would be themed. Theoretically, your version should take effect due to the option to update ActiveX automatically...
    Quote Originally Posted by msdn/vb6
    The Upgrade ActiveX Controls project property automatically updates any ActiveX controls if you have installed a newer version of them on your machine since the last time you opened the project.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #45
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [VB6] Manifest Creator II

    if I get it correctly, in order for a project to be themed, I need to use the v1.3 ?

  6. #46

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by VbNetMatrix View Post
    if I get it correctly, in order for a project to be themed, I need to use the v1.3 ?
    Ensure version 5 vs. version 6 of the common controls. Note that the comctl32 (v5), the version is retrieved from the dll (comctl32.dll), not the ocx. In your VB components (Ctrl+T), look for entry: Microsoft Windows Common Controls 5.0. The v6 (components entry: Microsoft Windows Common Controls 6.0) is a usercontrol that can't be themed via a manifest.

    FYI: My version number from the DLL is 5.82 xxxxxxx

    Where the 1.3 or 1.4 comes from, I don't know. Here is a somewhat interesting link regarding the revisions of that dll.

    Edited: Theming does not occur in the IDE unless VB6.exe has a manifest (external or embedded)

    Follow-up. I went to Microsoft's site and re-downloaded SP6. After reinstalling, I now have v1.4. I had a cached version of SP6 previously, that I used whenever I reinstalled VB6. Obviously SP6 was upgraded a bit sometime afterwards.
    Last edited by LaVolpe; Nov 25th, 2017 at 10:56 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #47
    Addicted Member
    Join Date
    May 2011
    Posts
    230

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by LaVolpe View Post
    Ensure version 5 vs. version 6 of the common controls. Note that the comctl32 (v5), the version is retrieved from the dll (comctl32.dll), not the ocx. In your VB components (Ctrl+T), look for entry: Microsoft Windows Common Controls 5.0. The v6 (components entry: Microsoft Windows Common Controls 6.0) is a usercontrol that can't be themed via a manifest.

    FYI: My version number from the DLL is 5.82 xxxxxxx

    Where the 1.3 or 1.4 comes from, I don't know. Here is a somewhat interesting link regarding the revisions of that dll.

    Edited: Theming does not occur in the IDE unless VB6.exe has a manifest (external or embedded)
    yes thanks, now I understand... I was aware about the v5 (themable dll) and v6 (static ocx)
    as for the vb6.exe, I don't use manifest on it because it cause too many problem in the IDE (the main one being the accessing the color)

    I also got 5.82, the next 4 number is the version of the OS (in my case 7601 mean Win7sp1) and the 5 other digit is the revision model, wich should be the same for everyone using the most recent version of the 5.82. I got 18837, do you have a most recent version ? just asking in case I missed a MS patch.

    btw, off topic, but is there a way so the forum when it send me email for new post doesn'T always send me to post #23 of page #1 of this thread ??? it seem to be keeping track of last comment I did instead of where I read.

    thanks for the link I'm reading it.

  8. #48
    Lively Member vbLewis's Avatar
    Join Date
    Feb 2009
    Location
    USA
    Posts
    126

    Re: [VB6] Manifest Creator II

    using 64 bit architecture it specifies 'ia64' this should be amd64 ? also a valid value is '*' for all.
    Last edited by vbLewis; Nov 20th, 2017 at 03:31 PM.

  9. #49

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by vbLewis View Post
    using 64 bit architecture it specifies 'ia64' this should be amd64 ? also a valid value is '*' for all.
    I err on the side of official documentation. Per MSDN (Application Manifests)...
    Specifies the processor. The valid values are x86 for 32-bit Windows and ia64 for 64-bit Windows. Optional.
    However, here is another quote I found on a page describing how to enable visual themes. Note that this deals specifically with the common controls dependency. Based on the following, I am considering offering amd64 & * for the common controls entry.
    Set the processorArchitecture entry to "X86" if your application targets the 32 bit Windows platform, or to "amd64" if your application targets the 64 bit Windows platform. You can also specify "*", which ensures that all platforms are targeted.
    Note: You can override this by holding the shift key and right clicking on the item. Then select "Value" from the context menu, you'll see a "New Value" submenu... that provides the option to override. On the GDI+ and Common Controls entry, holding the shift key offers the "Show Attributes" option. Once that is selected, now you can override via the "New Value" submenu.

    In the meantime, anyone can update the project to offer the other options:
    1. Find this line in cManifestEx class, pvValidateAttributes routine
    Code:
    .AddAttributeValueList "processorArchitecture", attr_HasValueList Or attr_CanBeBlank, "x86", "32 Bit", "ia64", "64 Bit"
    2. Suggested change
    Code:
    .AddAttributeValueList "processorArchitecture", attr_HasValueList Or attr_CanBeBlank, "x86", "32 Bit", "ia64", "64 Bit (Itanium)", "amd64", "64 Bit (AMD)", "*", "All Platforms"
    For VB applications (original intent of this project), 64-bit won't be in play. However, nice to know some may be using this for their non-VB projects.
    Last edited by LaVolpe; Nov 20th, 2017 at 08:07 PM. Reason: added another msdn quote
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  10. #50

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Minor update. Had an itch I had to scratch.

    There is an undocumented 2014 WindowsSettings option: forceFocusBasedMouseWheel. This is undocumented and I only know about it because it exists in the registry. After some trial and error, I have added that option; hence the update

    What that option does is revert to pre-Win10 mousewheel behavior where the mousewheel only affects the window with the keyboard focus. As of Win10, per Raymond Chen, Windows broke this and allowed the wheel to affect any window under the mouse, regardless whether it had the focus or not. The newly added option prevents that for the thread only. So if you had 2 listboxes that have scrollbars, this option will only allow the mouse to scroll the one that has the focus, even if the mouse is over the other listbox.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  11. #51
    Hyperactive Member
    Join Date
    Feb 2015
    Location
    Colorado USA
    Posts
    261

    Re: [VB6] Manifest Creator II

    Your release on 25 Oct 2017 shows version 2.0.4. So does your new version on 2 Sep 2019. Shouldn't it be incremented to at least 2.0.5?

  12. #52

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by MountainMan View Post
    Shouldn't it be incremented to at least 2.0.5?
    Feel free to change it to whatever you want. I often get lazy on incrementing when only minor updates are applied.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  13. #53
    Junior Member
    Join Date
    Sep 2019
    Posts
    22

    Re: [VB6] Manifest Creator II

    Thanks for creating this invaluable tool. I've been using it for quite some time now and it has always come in handy!

    I recently stumbled over an incorrect configuration when trying to use the printerDriverIsolation windowsSetting. You've put this into the wrong namespace (2013). According to the docs it should belong into the "http://schemas.microsoft.com/SMI/2011/WindowsSettings" namespace. As soon as I corrected your base XML in the resource file the error went away.

  14. #54

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    @ Caine, thanx for the bug report. I'll be sure to fix it. After reviewing MSDN, yepper 2011 vs 2013

    FYI: Two new settings showed up on MSDN lately which I'll include in the next update:
    - for 2019: <activeCodePage>
    - for 2020: <heapType>
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  15. #55

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Project updated to address bug report in post 53 by Cain.

    In addition to aligning printerDriverIsolation to the correct namespace, also needed to do this with: highResolutionScrollingAware

    Following enhancements made:
    - added activeCodePage and heapType elements, using 2019 and 2020 namespaces respectively
    - for any elements that can have comma-delimited values, those values can now be placed in user-defined order. This is important for the dpiAwareness element because first-recognized, first-used is the rule of thumb for that element's values. Example
    Code:
    <dpiAwareness>permonitorv2, permonitor, system</dpiAwareness>
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  16. #56
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,294

    Thumbs up Re: Embedded vs. External Manifests

    Quote Originally Posted by LaVolpe View Post
    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.
    I have been using resource files and manifests in my apps for quite some time but I've stumbled upon this thread while searching for how to update the user interface to reflect modern standards. Applying visual themes via the manifest file seems to be just the thing I was looking for. Your posts have helped me numerous times throughout the years, LaVolpe!

    Since you mentioned that it's possible to update the theme of the VB6 IDE itself, I definitely wanted to try that and I experienced the following outcomes:

    In both Windows 7 and Windows 10 the external manifest doesn't work unless you set "PreferExternalManifest=1" as you suggested. Setting it back to zero will ignore the external manifest again!

    If you set "PreferExternalManifest=1" there is an unexpected behavior in Windows 7. The "Network" icon will disappear from the taskbar (lower right corner, near the clock). Also clicking the clock will no longer display the calendar (nothing happens). These are fixed by setting PreferExternalManifest back to zero (requires reboot). In Windows 10 everything works correctly.

    I have found a way to embed the external manifest inside the VB6.EXE file by using the manifest tool (mt.exe) that comes with the Microsoft Windows SDK. If you don't have the SDK you can download just the mt.exe tool from: https://github.com/eladkarako/mt

    Code:
    mt.exe -manifest VB6.EXE.manifest -outputresource:VB6.EXE;1
    After running the command above, the new VB6.EXE will contain the manifest file embedded inside itself while somehow retaining the same file size as before and you will have the added benefit of the visual themes inside the IDE! Hope this helps.

  17. #57

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    FYI. Something I don't think I've used in over a decade was reported as an issue when project is manifested: frames inside frames

    In the old days of XP, some controls would not render correctly when placed in a frame, the option button was the biggest issue. The easy workaround then was to place those controls inside a picturebox, then put the picturebox inside the frame. After resizing, repositioning the picturebox and changing its backcolor as needed, you simply made it borderless. The controls that would not render properly in the frame would render properly in the picturebox inside the frame.

    Well, that problem can still arise when a frame is placed in another frame. The frame's caption won't render correctly. You can test this in a manifested IDE or compiled test project. The easy workaround is the same as was used back in the XP days ... place the frame inside a picturebox and that picturebox inside the other frame.

    I've added a note about this in post #2 (Tips, notes, etc)
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  18. #58
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,294

    Resolved Re: [VB6] Manifest Creator II

    It so happens that my project which needed a visual styles facelift also used several smaller frames inside one big frame so I was confronted with this bug right away. It seems that frames need to be hosted inside a container that has a DC (device context) and frame themselves don't have one, hence the need for the PictureBox.

    I wasn't going to add PictureBoxes at design time so I figured I could create temporary PictureBoxes at run time! For some reason this didn't work inside the Form_Load event so I had to use Form_Activate and also needed to make sure the Activate event didn't fire more than once:

    Code:
    Private Sub Form_Activate()
    Dim xControl As Control, PicContainer As PictureBox, i As Long
    Static bActivate as Boolean
        If bActivate Then Exit Sub
        bActivate = True
        i = 1
        For Each xControl In Me.Controls
            If TypeOf xControl Is Frame Then
                If TypeOf xControl.Container Is Frame Then
                    Set PicContainer = Me.Controls.Add("VB.PictureBox", "PictureBox" & i, xControl.Container)
                    i = i + 1 
                    With PicContainer
                        .BorderStyle = 0
                        .BackColor = xControl.Container.BackColor
                        .TabStop = False
                        .Visible = xControl.Visible
                    End With
                    With xControl
                        PicContainer.Move .Left, .Top, .Width, .Height
                        Set .Container = PicContainer
                        .Move 0, 0
                    End With
                End If
            End If
        Next xControl
    End Sub
    This code runs very nicely and provides a PictureBox container for each frame hosted inside a bigger frame. Hope this helps!

    Edited. Thanks for the tip LaVolpe, you rock as usual!
    Last edited by VanGoghGaming; Apr 19th, 2021 at 11:04 PM. Reason: Minor code tweak thanks to LaVolpe!

  19. #59

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by VanGoghGaming View Post
    This code runs very nicely and provides a PictureBox container for each frame hosted inside a bigger frame. Hope this helps!
    Nice touch, could help others. Just to nit pick a tiny bit... You could test the frame's container type instead of testing for Me, i.e., test for Frame specifically. If the container is a frame, then apply the dynamically loaded picturebox workaround, else don't. Worse case scenario otherwise is loading up unneeded picturebox controls, i.e., frame is in a picturebox already or frame added to some other ocx/control for example. Would be a small tweak and still remain generic.

    The only potential flaw I can see, and it would be on per-user scenarios, is ZOrder when it must matter to the user. I think that in majority of scenarios, your code should work just fine.

    Edited. If you want to tweak your code a bit, just update the above post vs. adding it again. Either way, I'm going to point people to your posting as an option for that specific problem.
    Last edited by LaVolpe; Apr 21st, 2020 at 02:59 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  20. #60
    Lively Member
    Join Date
    Feb 2007
    Posts
    126

    Re: [VB6] Manifest Creator II

    I notice that if I disable a frame (or label), it doesn't "gray out" anymore. Is there a workaround?

  21. #61

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    Well, if you are theming the controls, and don't like the way the theme is applied to some controls, not sure what anyone can say. The options seem to be just a couple: a) don't theme or b) subclass and draw the control yourself, c) use a custom control. You might be able to apply your own theme? In any case, that is a question that should be asked in the general VB forum section.

    Edited: The frame is probably a button-like control behind the scenes. It uses a window-style that includes the value 7 which is also the value for BS_GROUPBOX. Based on that and the description of a group-box, sounds a lot like a frame. And if actually a 'button' behind the scenes, that would explain why the theme is taking precedence.
    Last edited by LaVolpe; May 10th, 2020 at 02:45 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  22. #62

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    When manifesting the IDE to have it themed, that popup palette for color selection doesn't display correctly. The listbox of system colors works, but the palette is blank/erased. I have a remedy in an add-in that you can use. See this thread
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  23. #63
    New Member
    Join Date
    Oct 2020
    Posts
    1

    Re: [VB6] Manifest Creator II

    Hi, I am a bit of a VB6 beginner and I am trying to get this to work start to finish. I can't seem to find a step-by-step guide from the beginning to setting this up and get this running with themes in my projects. The instructions seem to be spread out over multiple threads and I can't seem to put all the pieces together. I would very much appreciate if someone put together a step-by-step process or a video. Thanks for this wonderful resource, and would appreciate any help.

  24. #64
    New Member
    Join Date
    Aug 2019
    Posts
    7

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by BobbyAxelrod112 View Post
    Hi, I am a bit of a VB6 beginner and I am trying to get this to work start to finish. I can't seem to find a step-by-step guide from the beginning to setting this up and get this running with themes in my projects. The instructions seem to be spread out over multiple threads and I can't seem to put all the pieces together. I would very much appreciate if someone put together a step-by-step process or a video. Thanks for this wonderful resource, and would appreciate any help.
    Hi BobbyAxelrod112

    I'm new to VBFORUMS and especially this topic but I am not new to forums in general.

    I could be wrong but I don't think you will receive what you asked for unless the question is asked similar to...

    "These is what I have done/tried/understand but I cannot figure out the next step."

    This narrows down the answer to something manageable for the replier.

  25. #65

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] Manifest Creator II

    @BobbyAxelrod112. Not really sure what the question is. The steps are fairly straightforward
    1. Create a valid manifest file
    2. Add that manifest to a resource file and rename the resource item, if necessary: Type of 24 and ID of 1
    3. Compile your project

    The Manifest Creator can do steps 1 & 2 for you. Manifests apply to compiled applications, not when uncompiled within the IDE. The exception of course is if the IDE is manifested -- two ways of doing that.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  26. #66
    New Member
    Join Date
    Aug 2019
    Posts
    7

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by VanGoghGaming View Post
    It so happens that my project which needed a visual styles facelift also used several smaller frames inside one big frame so I was confronted with this bug right away. It seems that frames need to be hosted inside a container that has a DC (device context) and frame themselves don't have one, hence the need for the PictureBox.

    I wasn't going to add PictureBoxes at design time so I figured I could create temporary PictureBoxes at run time! For some reason this didn't work inside the Form_Load event so I had to use Form_Activate and also needed to make sure the Activate event didn't fire more than once:

    Code:
    Private Sub Form_Activate()
    Dim xControl As Control, PicContainer As PictureBox, i As Long
    Static bActivate as Boolean
        If bActivate Then Exit Sub
        bActivate = True
        i = 1
        For Each xControl In Me.Controls
            If TypeOf xControl Is Frame Then
                If TypeOf xControl.Container Is Frame Then
                    Set PicContainer = Me.Controls.Add("VB.PictureBox", "PictureBox" & i, xControl.Container)
                    i = i + 1 
                    With PicContainer
                        .BorderStyle = 0
                        .BackColor = xControl.Container.BackColor
                        .TabStop = False
                        .Visible = True          '<== ADDED
                    End With
                    With xControl
                        PicContainer.Move .Left, .Top, .Width, .Height
                        Set .Container = PicContainer
                        .Move 0, 0
                    End With
                End If
            End If
        Next xControl
    End Sub
    This code runs very nicely and provides a PictureBox container for each frame hosted inside a bigger frame. Hope this helps!

    Edited. Thanks for the tip LaVolpe, you rock as usual!
    Maybe it's just my setup but I had to add '.Visible = True' line of code otherwise nothing showed.

    If the author agrees then maybe just change the original code a few posts back and delete mine to reduce clutter or please enlighten me otherwise ):

  27. #67
    New Member
    Join Date
    May 2019
    Posts
    1

    Re: [VB6] Manifest Creator II

    Hi,
    I've downloaded your Manifest Creator II and, when I tested it, I get the following:
    Name:  ManifestErrors.PNG
Views: 1356
Size:  46.7 KB
    I'm using Win 10.
    Thank you

  28. #68
    Addicted Member Davor Geci's Avatar
    Join Date
    Sep 2009
    Posts
    222

    Re: [VB6] Manifest Creator II

    Hello,
    can we use the manifest file to change the scrollbars of a controls?
    For example when we are creating a dark theme of our app to apply the dark theme for the scrollbars?
    Maybe if we change the theme of windows and to reflect this to the scrollbars?
    My projects:
    Virtual Forms
    VBA Telemetry

  29. #69
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,987

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by Davor Geci View Post
    Hello,
    can we use the manifest file to change the scrollbars of a controls?
    For example when we are creating a dark theme of our app to apply the dark theme for the scrollbars?
    Maybe if we change the theme of windows and to reflect this to the scrollbars?
    You can manifest the program to use Windows themes, also called Visual styles, and the controls that support visual styles will render with the visual style set on Windows (the theme).
    But you cannot change its colors or the controls parts individually, because that is set by the windows theme.

    Dark theme? Yes, set Windows to dark theme.

    If you otherwise want to apply a different theme only to your program, Windows does not support that but there is a third party library that does (it is not free): https://codejock.com/products/skinfr.../?2yn6s14z=p1z

  30. #70
    Lively Member
    Join Date
    Sep 2009
    Posts
    95

    Re: Manifest Creator II - Tips, Notes, Etc

    Hello LaVolpe, are you still active on VB6?

    I used that language for a small updating tool, but recently Windows Defender made some trouble with false alarms (but not on my own system). Therefore I wanted to try adding a manifest and see, if that helps...

    I downloaded one from the web, changed the values by hand and used it side by side. To test it, I put the value "requireAdministrator" in it. I thought, if it is working, it will prompt the UAC dialog. - But this did not happen.
    That is, why I tried your tool, but I am having some difficulties with it.

    Ich am getting the error, which you posted above (just not in English), when compiling and running your tool:
    Quote Originally Posted by LaVolpe View Post
    Compilation Errors
    Should you see an error like the following once your app is compiled...
    Name:  Image2.png
Views: 1210
Size:  5.6 KB
    ... There are two possible reasons for it:
    1. Your embedded manifest file size is not a multiple of 4 bytes. This is a bug with VB6 that SP6 fixed. If you don't have SP6 applied, do so. That fixes a lot more than the problem just mentioned. This tool now ensures it writes dword-aligned manifests to resource files anyway.
    I installed SP6, but the about dialog of VB6 does not show it. - Is this normal? (I am having VS6)

    Because of the exception, which I mentioned above, I did start your project by running it in the VBE. But its main window did not show any entries (just some checkboxes without a caption).

  31. #71
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,294

    Re: [VB6] Manifest Creator II

    If you want to use the "requireAdministrator" flag then your EXE file needs to be digitally signed with a certificate. You can either purchase such a certificate from a recognized certification authority like DigiCert, Comodo, etc (costs a fair chunk of cash and requires submitting a lot of personally identifying paperwork) OR you can generate your own certificate (with the "makecert" utility) but that won't be recognized as valid by the operating system.

    You could make your certificate recognizable as valid by making yourself a "Certification Authority" (also with the "makecert" utility) and adding it to the Root certificates repository with the "certutil" utility (certutil -user -addstore Root yourcertificateauhority.cer). The problem with this approach is that you need to run that command on every computer where you want to use your application. It's ok if your customers trust you with your application though.

  32. #72
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,294

    Thumbs up Re: [VB6] Manifest Creator II

    Quote Originally Posted by thomasaj05 View Post
    Maybe it's just my setup but I had to add '.Visible = True' line of code otherwise nothing showed.

    If the author agrees then maybe just change the original code a few posts back and delete mine to reduce clutter or please enlighten me otherwise ):
    You are correct, I have checked my code and indeed it needs the line:
    Code:
    .Visible = xControl.Visible
    I have added it in the above post as well!

  33. #73
    Lively Member
    Join Date
    Feb 2007
    Posts
    126

    Re: [VB6] Manifest Creator II

    Any plans to adapt this for Windows 11?

  34. #74
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,817

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by KenHorse View Post
    Any plans to adapt this for Windows 11?
    Ken, LaVolpe has left us. He got another job that wasn't VB6 related and said sayonara to us, so I believe you're on your own.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  35. #75
    Lively Member
    Join Date
    Feb 2007
    Posts
    126

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by Elroy View Post
    Ken, LaVolpe has left us. He got another job that wasn't VB6 related and said sayonara to us, so I believe you're on your own.

    Ok thanks. I'm slowly getting VB6 IDE going under Win11 on an VM on my Win10 computer and have many things worked out (including the serial comm now). I just noticed that the manifest additions don't seem to be working, at least not yet

  36. #76
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    1,294

    Re: [VB6] Manifest Creator II

    Quote Originally Posted by Elroy View Post
    Ken, LaVolpe has left us. He got another job that wasn't VB6 related and said sayonara to us, so I believe you're on your own.
    VB6 is like "Hotel California", you can always check out but you can never leave!

    You don't need this program to create manifests, they work just fine edited in Notepad...

  37. #77
    Lively Member
    Join Date
    Feb 2007
    Posts
    126

    Re: [VB6] Manifest Creator II

    That's the beauty of LaVolpe's Creator. You don't really need to know what you're doing

  38. #78
    Junior Member
    Join Date
    Sep 2019
    Posts
    22

    Re: [VB6] Manifest Creator II

    For what it's worth, according to the docs the value of the <supportedOS> tag is the same for Windows 10, Windows 11, Windows Server 2016, Windows Server 2019 and Windows Server 2022. Unless there are other changes, there's nothing to worry about.

    A cursory glance shows only this change: the <activeCodePage> tag isn't limited to UTF-8 anymore with Windows 11. I might be wrong, though.

  39. #79
    Member Taro's Avatar
    Join Date
    Feb 2014
    Posts
    33

    Re: [VB6] Manifest Creator II

    Oh, sad to hear this.

    LaVolpe is the most valuable person in our VB classic world. Hope he comes back to see us soon.

  40. #80
    Junior Member
    Join Date
    Jul 2015
    Posts
    16

    Re: [VB6] Manifest Creator II

    PLEASE IGNORE THIS POST! I NOW REALISE I MADE A SIMILAR POST 5 YEARS AGO. My excuse? I'm getting old...

    Having used Make My Manifest in the past, with complete success, I now get problems with running VB6 programs on Windows 10 using external manifest files. To be fair, several of my programs work fine on W10 "out of the box", so to speak. I just copy the main folder from XP to Windows 10 and the program runs. But there's one particular program which is fairly straightforward that will not run on W10 and throws all kinds of errors.

    So I started researching SxS in more depth and found Manifest Creator II v2.03, but I just cannot get started with it. I cannot find any instructions on how to use it. I also tried Manifest Creator I, the first version, and that is slightly more intuitive, but II just leaves me floundering. There's a long list of checkboxes with little explanation on how to proceed.

    Has anyone produced a detailed guide to using this tool, which is obviously capable, given the number of comments I see.

    Right now, I'm building a new manifest the hard way by using mt.exe to extract dependencies, following the very excellent tutorial by Elroy "Using OCX Files with SxS Technology".
    Last edited by LittleTyke; Oct 8th, 2022 at 05:17 PM. Reason: I already asked a similar question 5 years ago!

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width