Results 1 to 22 of 22

Thread: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

  1. #1

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Thumbs up VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    This is another spin on "Customizable Balloon Tooltips" for your controls (mainly inspired from Elroy's example in this thread). All relevant code for the tooltips is encapsulated in the "cTT" class which is predeclared for ease of use. This class keeps track of all added tooltips and they are displayed automatically when the user hovers the mouse over a control that has a balloon tooltip attached.

    • All tooltips are fully customizable as seen in the screenshot below.
    • You can toggle enabling or disabling the display of tooltips either for specified controls or for all at once.
    • Once created, a tooltip can be modified later without creating a new one
    • The class supports both regular controls (those with a "hWnd" property) as well as windowless controls ("Label" for example)


    Name:  BalloonTooltips.png
Views: 2630
Size:  23.2 KB

    Here is the demo project: BalloonTooltips.zip

  2. #2
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    3,560

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Very snazzy!
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  3. #3
    Fanatic Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    630

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Very nice job.

    It can be done without a resource file, it is to move it to a dll.

    greetings

  4. #4

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Wink Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    As long as the main executable is manifested for the modern theme you should be able to move the "cTT" class into a DLL just fine. You seem to like moving everything to DLLs, maybe make your very own RC# collection!

  5. #5
    Fanatic Member
    Join Date
    Jun 2016
    Location
    España
    Posts
    630

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Quote Originally Posted by VanGoghGaming View Post
    As long as the main executable is manifested for the modern theme you should be able to move the "cTT" class into a DLL just fine. You seem to like moving everything to DLLs, maybe make your very own RC# collection!
    if I use many DLLs like regfree.
    I like to separate my work into dlls, so I can reuse them.

    maybe make your very own RC# collection!
    I wish I could, my knowledge is reduced

  6. #6
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    760

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    This looks great!

    A couple of questions for you:

    1. Does this support unicode text?
    2. What does this offer that Elroy's does not?

    I'm asking as someone who's already using Elroy's class so trying to figure out if I should switch classes.
    Last edited by AAraya; Jul 25th, 2024 at 09:27 AM.

  7. #7

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Wink Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    It's in the thread's title (supports Unicode)...



    I recommend you download it and give it a whirl. The whole idea came from the thread linked in the first post. There Elroy posted a BAS module, not a class.

  8. #8
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    760

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Quote Originally Posted by VanGoghGaming View Post
    It's in the thread's title (supports Unicode)...
    Name:  blind mouse.jpg
Views: 2355
Size:  35.4 KB

    Haha! Well in my defense I have about a dozen new VBForums threads open at one time that I'm quickly glancing through to see if there's anything new for me to learn.

    Thanks for pointing out what I missed.
    Last edited by AAraya; Jul 26th, 2024 at 09:22 AM.

  9. #9
    Junior Member
    Join Date
    Nov 2024
    Location
    USA, Pennsylvania
    Posts
    21

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    thanks for your work on this, VanGoghGaming!

    Questions:
    1. At least on my machine, your VB6 project shows the tooltips in a compiled EXE, but not when running in the VB6 IDE. Is that expected?

    2. In my case (I suspect typical), I just need UNICODE and multi-line tooltips.
    Could you release a simplified version to avoid the icons & the dependency on resource files?
    If not, could you explain how to handle the .res, .rc, and MAKERES.BAT files to integrate your .res into an existing project that already has a different .res file?

  10. #10

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Talking Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    1. If you want the tooltips to show up in IDE you need to manifest your VB6.EXE for the modern theme. You can take the included manifest, rename it to "VB6.EXE.manifest" and copy it in the same folder as "VB6.EXE". Depending on your Windows settings (there is a registry key, I forgot what it's called) this may or may not be enough. If it still doesn't work you can always embed the manifest inside the "VB6.EXE" file using "MT.EXE" (the manifest tool from the Windows SDK, free download).

    2. The tooltip function is fully customizable mate, you can choose "TTI_NONE" for the icon parameter if you don't like icons. There is no simplified version, this is it, you don't need any separate icons or anything (those are the default Windows icons). What you do need is the manifest for the modern theme as explained in post #4 above. I have included such a manifest as a courtesy but if your app is already manifested then you can safely ignore the included resource file (which contains only this manifest)!

  11. #11
    Junior Member
    Join Date
    Nov 2024
    Location
    USA, Pennsylvania
    Posts
    21

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    I did apply the manifest for VB6. Turns out we also need to update the modified date of the VB6.EXE (to bust caching).
    The tooltips now work both in the IDE as well as in the compiled EXE. Thanks!

    The tooltips work only if the project uses your BalloonTooltips.res.
    I would like to use VBCCR18SideBySide.res so I tried, but failed, to merge the 2 res files (using Resource Hacker).
    Could you describe how they should be merged?

    Also, after some tooltip interaction, some of the tooltips stop popping for some of the controls.
    After some further clicks, they tend to come back. Is this a known issue?

    Many Thanks!

  12. #12

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Lightbulb Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Quote Originally Posted by Condor3 View Post
    The tooltips work only if the project uses your BalloonTooltips.res.
    I would like to use VBCCR18SideBySide.res so I tried, but failed, to merge the 2 res files (using Resource Hacker).
    Could you describe how they should be merged?
    I should say that I am not familiar with VBCCR18SideBySide.res so I don't know what it contains but if you open it in "Resource Hacker" and you see a resource of type "Manifest" then you're not meant to add another one! You could edit the existing manifest and look for this code:

    Code:
    <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" version="6.0.0.0" processorArchitecture="x86" name="Microsoft.Windows.Common-Controls" language="*" publicKeyToken="6595b64144ccf1df"/>
        </dependentAssembly>
      </dependency>
    That will enable the modern theme for your app, including the balloon tooltips!

    Also, after some tooltip interaction, some of the tooltips stop popping for some of the controls.
    After some further clicks, they tend to come back. Is this a known issue?
    Yes, this behavior is by design, tooltips are not meant to be annoying for the user so they seem to take a break if abused!

  13. #13
    Junior Member
    Join Date
    Nov 2024
    Location
    USA, Pennsylvania
    Posts
    21

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Many thanks for the speedy reply!
    The current resource is the one for Krool's UNICODE controls. Resource Hacker shows it as:

    Name:  Resource_Hacker_View_of_First_RES_File.jpg
Views: 1360
Size:  29.1 KB

    You provided some code and stated: "You could edit the existing manifest and look for this code..."
    Did you mean insert this code... ?

    Thanks for the clarification about the "dormant" tooltip behavior.

  14. #14

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    If it's not there then yes insert it, that should take care of the balloon tooltips problem.

  15. #15
    Junior Member
    Join Date
    Nov 2024
    Location
    USA, Pennsylvania
    Posts
    21

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Many Thanks!

  16. #16
    Junior Member
    Join Date
    Nov 2024
    Location
    USA, Pennsylvania
    Posts
    21

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Oops; the merged res file, shown below:

    Name:  Marged_Res_File.jpg
Views: 1371
Size:  12.3 KB

    causes a loss of styling, as provided by Krool's controls:

    Name:  Merged_Res_File_Causes_Styling_Loss.jpg
Views: 1368
Size:  26.0 KB

    The tooltips still work, but the form styling should not be lost while supporting the side-by-side res file to simplify deployment.

  17. #17

    Thread Starter
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,619

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Have you tried the other way around? Copying the side-by-side info (file tag) into the BalloonTooltips manifest and recompiling the resource file?

    I haven't used Krool's controls but it seems there's also a "Std-exe" version that doesn't rely on external OCX files. As far as I can tell, it also includes a resource file with the dependency tag for the modern theme already present. Have you tried that?

    Ultimately it's worth asking Krool as well since he is the most qualified to solve this issue.

  18. #18
    Fanatic Member HackerVlad's Avatar
    Join Date
    Nov 2023
    Posts
    681

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    I also did my own project on tooltips. I really like it too. It was especially difficult to make a tooltip that automatically moves, following the mouse pointer, at the same distance as in Windows OS.

  19. #19
    Junior Member
    Join Date
    Dec 2023
    Posts
    30

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    thx,and i fit it into twinbasic for x64.
    prjBalloonTooltips.7z

  20. #20
    Fanatic Member HackerVlad's Avatar
    Join Date
    Nov 2023
    Posts
    681

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    It's a good project, but it's worth noting that the tooltips (balloons) use the style of the old Windows XP, not the style of the current OS. This will not be acceptable for everyone, but I was developing my own project where the tooltips adopt the style of the current OS.

  21. #21
    Junior Member
    Join Date
    Aug 2006
    Posts
    27

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    fantastico

  22. #22
    Addicted Member
    Join Date
    Nov 2016
    Location
    Italy
    Posts
    234

    Re: VB6 - Customizable Balloon Tooltips for all controls (supports Unicode)

    Why does the Balloon ToolTip flash if the text is long?
    Last edited by fabel358; Jan 14th, 2026 at 11:16 AM.

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