Results 1 to 15 of 15

Thread: [RESOLVED] Manifest file for XP buttons not working with executable

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    Resolved [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

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Manifest file for XP buttons not working with executable

    Are you making the call to InitCommonControlsEx? Post your startup code.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    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

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    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..
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  6. #6
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Manifest file for XP buttons not working with executable

    Do it in a Sub Main. Here's a sample.
    Attached Files Attached Files

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    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?

  9. #9

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Manifest file for XP buttons not working with executable

    Toolbar buttons dont have a graphical style
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    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

  12. #12

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    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!

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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

  14. #14

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    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

  15. #15

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    40

    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!

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