Results 1 to 30 of 30

Thread: [RESOLVED] VB6 QUESTION: Providing Documentation for your Utility.

  1. #1

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Resolved [RESOLVED] VB6 QUESTION: Providing Documentation for your Utility.

    When you create a utility and want to document what it does in a 'help' fashion via something like a 'help' button, what do you use to accomplish this?

    I have created a .HTML file with images and text as usual and it is currently accessed via a browser. Previously I have created a CHM file which, in my opinion was quite a useful method for presenting help documentation but it seems to be outdated now and no longer the preferred route.

    Can I ask what you do in order to provide your users with documentation and how you present it, what tools do you use &c? I'd like some guidance.
    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.

  2. #2
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    I think it depends heavily on what you want to do. Personally, I abandoned CHM files some time ago (back in about 2004). They're just too cumbersome to maintain.

    Regarding "Help" in my primary application, I use a combination of both the F1 key and specific "Help" buttons.

    Regarding the F1 key, I primarily use it to provide a brief overview of what the entire form does. And those are actually Word (DOC) files that are downloaded from an FTP site. That just allows me a maximum of flexibility with a minimum of fuss for maintaining those form overview documents. But that approach might be peculiar to my situation.

    Regarding "help buttons", those are for more specific things, and they're scattered around in various places in my primary application, and they result in two different situations: 1) where a specific "help form" pops up, explaining something, or 2) a PDF is loaded and shown to the user (also explaining something specific). Let me provide examples of each of those:

    1) Specific help form. The following is a piece of a data entry form:

    Name:  Help1.jpg
Views: 499
Size:  25.6 KB

    And then, what happens if you click the red-circled button:

    Name:  Help3.png
Views: 499
Size:  63.5 KB

    That "help" form is an "always on top" form but it's not modal. In fact, all of those help forms are stuffed into an ActiveX DLL. And they're setup in such a way that, when you click off of them, they auto-close, making them easy to get rid of.

    2) A PDF is loaded. These are cases where the "help" is more involved. For instance, my software performs "balance" protocol calculations on a center-of-pressure (COP) path taken from either a plantar-pressure sensel mat or a 3D force-plate. These calculations are quite involved, but users often want to know the exact mathematical equations for them. These are outlined in a multi-page PDF, which can be retrieved by clicking the following button on the main balance protocol data processing form:

    Name:  Help5.png
Views: 486
Size:  1.9 KB

    And then, here's a small section of the PDF file that's loaded (with the ShellExecute API) when that button is clicked:

    Name:  Help6.jpg
Views: 490
Size:  46.9 KB

    These PDF files were created with Word (saved as PDF), and then saved into the "Resources" area of the VB6 source code. They're pulled out and placed into a "Temp" folder for viewing.

    ----------------

    Maybe that'll help.
    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.

  3. #3
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    In my latest big program I added in the menu an option "Help" that shows a pdf file with basic usage information for the program.

    We have to think that most users don't like, don't want and won't read a manual or help file. So the program need to be as easy to understand and intuitive as possible. Still, just for completeness and quality it is nice to have the manual/help.

    Aside from that pdf, and for trying to make the program as understandable, easy and intuitive as possible, in some parts I added little buttons next to some actions or things that I thought that could be difficult to understand.

    Name:  Sin título.png
Views: 421
Size:  3.2 KB

    Pressing these buttons usually show a balloon tooltip (or may be a MsgBox) with an explanation but at least in one place I show a form with a RichTextBox with the info.

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Ahhh yes, Eduardo brings up a good point regarding "balloon tooltips". I also use those extensively.

    I even developed an "enhanced" combobox whereby I could have balloon tooltips on each combo item. In the example below, what's in the balloon is actually constructed from other information that's established in a setup/maintenance area of the software:

    Name:  ComboHelp.png
Views: 488
Size:  9.2 KB

    So again, it just comes down to what you're trying to do, and what you think will be most intuitive for your users.
    Last edited by Elroy; Oct 8th, 2021 at 09:29 AM.
    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.

  5. #5

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Right. I will enable the F1 key, currently not used to initiate help in my form.

    I do use tooltips extensively but just the standard types on this application.
    Assuming you are using a 3rd party tool to create the balloon tooltips, which add-on, do you use?

    I have used a balloon tooltips on another project I created ten/fifteen years ago but they were a bit of a pain to create. Any newer, better advice accepted! I don't fancy rolling my own at this stage as I just want to finish my project.

    It seems that the advice is use PDF documents rather than HTML (any specific reason for this?) In addition context-sensitive help is best provided using some additional form logic.

    Interesting idea to store the help forms in a DLL, what is the advantage in this?

    Thankyou all, that is grist to my mill.
    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.

  6. #6
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    About F1, I wouldn't say it is a bad practice because it is not, it may be a "good practice" but I don't know of anyone that in the century 21 presses F1 for getting help.

  7. #7

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Eduardo- View Post
    About F1, I wouldn't say it is a bad practice because it is not, it may be a "good practice" but I don't know of anyone that in the century 21 presses F1 for getting help.
    Well, they might, so it is good to cater for that

    I already have a big HELP button on my form that cannot be missed.

    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.

  8. #8

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    What do you use to create the balloon tooltips?
    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.

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

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    This is what I use. I'm not terribly proud of it as it could use some cleanup, but it has served my needs for many years:

    For a BAS module:
    Code:
    
    Option Explicit
    '
    Private Declare Function SendMessageA Lib "user32" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
    Private Declare Function SendMessageLongA Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    '
    Private Type TOOLINFO
        lSize       As Long
        lFlags      As Long
        hWnd        As Long
        lId         As Long
        '
        'lpRect      As RECT
        Left        As Long
        Top         As Long
        Right       As Long ' This is +1 (right - left = width)
        Bottom      As Long ' This is +1 (bottom - top = height)
        '
        hInstance   As Long
        lpStr       As String
        lParam      As Long
    End Type
    '
    Private Declare Sub InitCommonControls Lib "comctl32" ()
    Private Declare Function CreateWindowExW Lib "user32" (ByVal dwExStyle As Long, ByVal lpClassName As Long, ByVal lpWindowName As Long, ByVal dwStyle As Long, ByVal x As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long
    Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long
    '
    Private Const WM_USER               As Long = &H400&
    Private Const CW_USEDEFAULT         As Long = &H80000000
    '
    Private Const TTM_ACTIVATE          As Long = WM_USER + 1&
    'Private Const TTM_ADDTOOLA          As Long = WM_USER + 4&
    Private Const TTM_ADDTOOLW          As Long = WM_USER + 50&
    Private Const TTM_SETDELAYTIME      As Long = WM_USER + 3&
    'Private Const TTM_UPDATETIPTEXTA    As Long = WM_USER + 12&
    Private Const TTM_UPDATETIPTEXTW    As Long = WM_USER + 57&
    Private Const TTM_SETTIPBKCOLOR     As Long = WM_USER + 19&
    Private Const TTM_SETTIPTEXTCOLOR   As Long = WM_USER + 20&
    Private Const TTM_SETMAXTIPWIDTH    As Long = WM_USER + 24&
    'Private Const TTM_SETTITLEA         As Long = WM_USER + 32&
    Private Const TTM_SETTITLEW         As Long = WM_USER + 33&
    '
    Private Const TTS_NOPREFIX          As Long = &H2&
    Private Const TTS_BALLOON           As Long = &H40&
    Private Const TTS_ALWAYSTIP         As Long = &H1&
    '
    Private Const TTF_CENTERTIP         As Long = &H2&
    Private Const TTF_IDISHWND          As Long = &H1&
    Private Const TTF_SUBCLASS          As Long = &H10&
    Private Const TTF_TRANSPARENT       As Long = &H100&
    '
    Private Const TTDT_AUTOPOP          As Long = 2&
    Private Const TTDT_INITIAL          As Long = 3&
    '
    Private Const TOOLTIPS_CLASS        As String = "tooltips_class32"
    '
    Private Const GWL_EXSTYLE           As Long = &HFFFFFFEC
    Private Const WS_EX_TOOLWINDOW      As Long = &H80&
    Private Const WS_EX_TOPMOST         As Long = &H8&
    '
    Public Enum ttIconType
        TTNoIcon
        TTIconInfo
        TTIconWarning
        TTIconError
    End Enum
    #If False Then ' Intellisense fix.
        Public TTNoIcon, TTIconInfo, TTIconWarning, TTIconError
    #End If
    '
    Private hwndTT As Long ' hwnd of the tooltip
    '
    
    Public Sub CreateToolTip(ByVal ParentHwnd As Long, _
                             ByVal TipText As String, _
                             Optional ByVal uIcon As ttIconType = TTNoIcon, _
                             Optional ByVal sTitle As String, _
                             Optional ByVal lForeColor As Long = -1&, _
                             Optional ByVal lBackColor As Long = -1&, _
                             Optional ByVal bCentered As Boolean, _
                             Optional ByVal bBalloon As Boolean, _
                             Optional ByVal lWrapTextLength As Long = 50&, _
                             Optional ByVal lDelayTime As Long = 200&, _
                             Optional ByVal lVisibleTime As Long = 5000&)
        '
        ' If lWrapTextLength = 0 then there will be no wrap.
        ' Also, lWrapTextLength = 40 is a minimum value.
        ' The max for lVisibleTime is 32767.
        '
        Static bCommonControlsInitialized   As Boolean
        Dim lWinStyle                       As Long
        Dim ti                              As TOOLINFO
        Static PrevParentHwnd               As Long
        Static PrevTipText                  As String
        Static PrevTitle                    As String
        '
        ' Don't do anything unless we need to.
        If hwndTT <> 0& And ParentHwnd = PrevParentHwnd And TipText = PrevTipText And sTitle = PrevTitle Then Exit Sub
        PrevParentHwnd = ParentHwnd
        PrevTipText = TipText
        PrevTitle = sTitle
        '
        If Not bCommonControlsInitialized Then
            InitCommonControls
            bCommonControlsInitialized = True
        End If
        '
        ' Destroy any previous tooltip.
        If hwndTT <> 0& Then DestroyWindow hwndTT
        '
        ' Format the text.
        FormatTooltipText TipText, lWrapTextLength
        '
        ' Initial style settings.
        lWinStyle = TTS_ALWAYSTIP Or TTS_NOPREFIX
        If bBalloon Then lWinStyle = lWinStyle Or TTS_BALLOON ' Create baloon style if desired.
        ' Set the style.
        hwndTT = CreateWindowExW(WS_EX_TOOLWINDOW Or WS_EX_TOPMOST, StrPtr(TOOLTIPS_CLASS), 0&, lWinStyle, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0&, 0&, App.hInstance, 0&)
        '
        ' Setup our tooltip info structure.
        ti.lFlags = TTF_SUBCLASS Or TTF_IDISHWND
        If bCentered Then ti.lFlags = ti.lFlags Or TTF_CENTERTIP
        ' Set the hwnd prop to our parent control's hwnd.
        ti.hWnd = ParentHwnd
        ti.lId = ParentHwnd
        ti.hInstance = App.hInstance
        ti.lpStr = TipText
        ti.lSize = LenB(ti)
        ' Set the tooltip structure
        SendMessageLongA hwndTT, TTM_ADDTOOLW, 0&, VarPtr(ti)
        SendMessageLongA hwndTT, TTM_UPDATETIPTEXTW, 0&, VarPtr(ti)
        '
        ' Colors.
        If lForeColor <> -1& Then SendMessageA hwndTT, TTM_SETTIPTEXTCOLOR, lForeColor, 0&
        If lBackColor <> -1& Then SendMessageA hwndTT, TTM_SETTIPBKCOLOR, lBackColor, 0&
        '
        ' Title or icon.
        If uIcon <> TTNoIcon Or sTitle <> vbNullString Then SendMessageLongA hwndTT, TTM_SETTITLEW, CLng(uIcon), StrPtr(sTitle)
        '
        SendMessageLongA hwndTT, TTM_SETDELAYTIME, TTDT_AUTOPOP, lVisibleTime
        SendMessageLongA hwndTT, TTM_SETDELAYTIME, TTDT_INITIAL, lDelayTime
    End Sub
    
    Public Sub DestroyToolTip()
        ' It's not a bad idea to put this in the Form_Unload event just to make sure.
        If hwndTT <> 0& Then DestroyWindow hwndTT
        hwndTT = 0&
    End Sub
    
    Private Sub FormatTooltipText(TipText As String, lLen As Long)
        Dim s       As String
        Dim ss()    As String
        Dim i       As Long
        Dim j       As Long
        '
        ' Make sure we need to do anything.
        If lLen = 0& Then Exit Sub
        If lLen < 40& Then lLen = 40&
        If Len(TipText) <= lLen Then Exit Sub
        '
        ss = Split(TipText, vbCrLf)                     ' We split each line separately.
        For j = LBound(ss) To UBound(ss)
            If Len(ss(j)) > lLen Then
                s = vbNullString
                Do
                    i = InStrRev(ss(j), " ", lLen + 1&)
                    If i = 0& Then
                        s = s & Left$(ss(j), lLen) & vbCrLf ' Build "s" and trim from TipText.
                        ss(j) = Mid$(ss(j), lLen + 1&)
                    Else
                        s = s & Left$(ss(j), i - 1&) & vbCrLf ' Build "s" and trim from TipText.
                        ss(j) = Mid$(ss(j), i + 1&)
                    End If
                    If Len(ss(j)) <= lLen Then
                        ss(j) = s & ss(j) ' Place "s" back into ss(j) and get out.
                        Exit Do
                    End If
                Loop
            End If
        Next
        TipText = Join(ss, vbCrLf)
    End Sub
    
    
    
    
    And a bit of test code for a Form1:

    Code:
    
    Option Explicit
    
    Private Sub Form_Activate()
        CreateToolTip Me.hWnd, "This is tooltip text that's just attached to the form, but it can be attached to any control with a hWnd as well.", _
                      TTIconInfo, "The tooltip title", , , , True
    End Sub
    
    
    And a screenshot:

    Name:  Tooltip.png
Views: 367
Size:  7.6 KB

    And, just as a note, it's seen in the comments but I thought I'd say it here as well. It's probably a good idea to make a call to DestroyToolTip in Form_Unload of any form that has controls that use this.
    Last edited by Elroy; Oct 18th, 2021 at 08:24 AM.
    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.

  10. #10

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Well, it is better than what I have been using. A multiline tooltip from a decade or so ago.





    Elroy, Just tried your balloon tooltip code on a completely new and empty VB6 project and it seems not to generate any tooltips at all. Strange, I must be missing something.
    Last edited by yereverluvinuncleber; Oct 18th, 2021 at 09:31 AM.
    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.

  11. #11
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,415

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Elroy View Post
    *snip*

    These PDF files were created with Word (saved as PDF), and then saved into the "Resources" area of the VB6 source code. They're pulled out and placed into a "Temp" folder for viewing.

    ----------------

    Maybe that'll help.
    Elroy,
    out of curiosity:
    How do you clean up that temp-Folder?
    Are you tracking whatever Viewer is used when it gets closed?
    Or are you polling the Folder trying to empty it with skipping the files which are "in use"?
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  12. #12
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Zvoni View Post
    Elroy,
    out of curiosity:
    How do you clean up that temp-Folder?
    Are you tracking whatever Viewer is used when it gets closed?
    Or are you polling the Folder trying to empty it with skipping the files which are "in use"?
    For most of these things, it's a folder named "Temp" as a sub-folder wherever my EXE resides. But note, my EXE is portable (no installation required) and most users actually set it out on their network so that multiple users can easily get to it (typically with a desktop shortcut). In other words, it's almost never in a "C:\Program Files (x86)" folder. So, that's one thing to consider.

    Having said that, I actually auto-create a half-dozen or so sub-folders (for various things) wherever the EXE is residing, and one of them is this "Temp" folder.

    And, truth be told, I never clean it out. Once in a blue-moon, I might tell a user to go in there and delete everything, but even that is rare.

    Also, not for these purposes, but for other things, I do occasionally set stuff out into a user's "...\AppData\Local\Temp" folder. But, I don't necessarily clean-up there either. But, regarding that one, I think Windows will occasionally clean up that one.
    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.

  13. #13

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Elroy View Post
    Elroy, you missed my question. Just tried your balloon tooltip code on a completely new and empty VB6 project and it seems not to generate any tooltips at all. Strange, I must be missing something.
    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.

  14. #14
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by yereverluvinuncleber View Post
    Elroy, you missed my question. Just tried your balloon tooltip code on a completely new and empty VB6 project and it seems not to generate any tooltips at all. Strange, I must be missing something.
    Ahh, hey, just got back. Ber, if you'll show me some code, I'd be delighted to take a look.

    And also, what I gave in the post above was a brand new project. Maybe just follow that example.

    And just an FYI, I just copy-pasted the code out of the above post, and it worked perfectly for me.
    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.

  15. #15
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,582

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    So, you moved your mouse over the form, and paused to see if the tooltip appeared?
    It worked fine for me, unmodified from Elroy's post.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

  16. #16

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Elroy View Post
    Ahh, hey, just got back. Ber, if you'll show me some code, I'd be delighted to take a look.
    How strange, some digging at my end required.

    Ah. My memory is working... I have had a tooltip problem before on this machine, some three or four months ago. It runs another product that interferes with the standard tooltips of all Delphi-created products and I have to disable it for those tooltips to appear... It may be affecting this method of generating tooltips too. I know what to test and how. Will report back.
    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.

  17. #17
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,995

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by yereverluvinuncleber View Post
    I have had a tooltip problem before on this machine
    Balloon tooltips require at least certain version of Common Controls loaded.
    I think in XP without control's themes enabled (visual styles) it didn't work.

  18. #18
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Ber, also, I was looking around my code at how I used that CreateTooltip call, and 99% of the time, I actually make the call in the ControlName_MouseMove event.

    Sorry I didn't mention that earlier. However, I don't think that explains the problems you're having.

    EDIT: Actually, it's more like about 50% of the time. However, once you get it working in MouseMove, then you can start playing around with it for other purposes (like different help for items in a ListBox or ComboBox), or having it come up only after something has been clicked.
    Last edited by Elroy; Oct 18th, 2021 at 09:01 PM.
    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.

  19. #19

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    The tooltips worked immediately I disabled the tool that I had removed before.

    I have two javascript engines running on my PCs, one is the old konfabulator or YWE and the other is known as Xwidget (not to be confused with programming XWidgets).

    They both render XML defined graphical objects (PNGs) to the screen using web technology and the logic for the programs is using javascript. I have a dozen or more programs running under the YWE and three small programs running under Xwidget that are very useful.

    Previously, I noticed that all the utilities on my desktop that were written in Delphi had missing tooltips. I use the Context and RJTextEd editors to do my .js programming and they were both affected, no tooltips shown, both being written in Delphi.

    It took me a while to conclude that it was this particular utility that was causing the conflict or suppression of the Delphi tooltips. Those that it suppressed were the normal one line tooltips that you would see in any program.

    Note: Tooltips in other programs were unaffected, VB6 tooltips are unaffected completely.

    However, your tooltip method is suppressed when this tool is operating. My earlier VB6 multiline tooltip still continues to operate when this tool is running. I cannot remember how it does what it does. I'll compare each solution and see if there is any commonality.

    I cannot report this as a bug to the developer of Xwidget as he is incompetent - brilliant and innovative but utterly incompetent when it comes to any sort of support, an unusual mix? He would certainly not listen to a bug report, will never respond and would never fix anything...

    Elroy, I'll use your tooltips but I'll have to test them without Xwidget running. In any case very few people will be running this combination of utilities so it isn't really an issue. I just thought I'd place my thoughts here so you can respond if you want.



    The useful Xwidget programs are the Fish called Wanda, my volume control top right and the little KILL button next to it that stops the engines dead when I double click on it. I could do without Wanda but she is just lovely, swimming so realistically on my desktop. The kill button I could reproduce in VB6/.NET but my volume control would need some work to replace. I suppose I could do that as I have a pre-existing YWE version that would need an underlying VB6 program to actually change the volume. That all has nothing to do with the actual problem. It just shows why I don't want to uninstall Xwidget.

    I love the appearance of your tooltips Elroy.
    Last edited by yereverluvinuncleber; Oct 19th, 2021 at 07:57 AM. Reason: Fixed a typo or two.
    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.

  20. #20

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Looking into it deeper and I find it is actually Wanda herself. She is an animated PNG. I close her down and the tooltips re-appear. It is to do with the way that Xwidget renders animated PNGs, so I can keep Xwidget minus 1 Wanda. Sad.
    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.

  21. #21
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Ber, that's the kind of thing I'd get stubborn about, and find a way to make it work.

    One idea I've got is to get Wanda into another PID (basically, another program, or maybe an ActiveX EXE). I haven't messed with APNGs much though, so I'm not sure the animation would keep going if one of that PID's forms didn't have the focus. I'd sure play around with it though.
    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.

  22. #22

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Elroy View Post
    Ber, that's the kind of thing I'd get stubborn about, and find a way to make it work.
    Yes, me too but I have enough on my plate. I can send you the APNG if you want it.

    The good thing about my limited Xwidget use is that I am aiming to replace what it provides entirely eventually. I just need some system volume code and the ability to (easily) create transparent controls with PNGs, then I can do it myself, I might have to resort to another language for that.

    I could do without Wanda at a push, I just don't want to.

    Can GDIP handle APNGs frame by frame? I should think that might be a route.
    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.

  23. #23
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    I'm sure I can find an APNG somewhere. If I get motivated in that direction, I'll take a look at it and see about getting one animated while I'm showing a balloon.
    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.

  24. #24

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Thankyou! By the way, your tooltips have enlivened my program enormously. I am busy populating each with a proper selection from my help documentation.
    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.

  25. #25
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Ok, I took a CodeBank project of LaVolpe's found here, and just added my balloon tooltips to it.

    All I did was unzip all the pieces of his project, add a BAS module and put my post #9 BAS code in it, and then put the following at the bottom of his frmAnimate form:

    Code:
    
    
    Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        CreateToolTip Command2.hWnd, "Click this button to randomly change the back color of the form and for the transparencies of the animations.", _
                      TTIconInfo, "Tooltip for this button", , , , True
    End Sub
    
    
    
    Then, I ran his project, selected his "GIF & PNG animation" option, clicked the "Run Sample" button, and then hovered over the "Toggle Back Color" button, and got this:

    Name:  APNG&Balloon.jpg
Views: 307
Size:  34.8 KB

    I didn't take a movie, but both chess pieces are moving, and the basketball is bouncing.

    The chess pieces are GIF files, and the basketball is an APNG file.
    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.

  26. #26

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Hmmm. So, if I created a transparent form that filled the screen size it should be possible to get Wanda to wander. Do you fancy attaching your mini project?
    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.

  27. #27
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    You mean LaVolpe's project that I wedged my balloon tooltips into? Sure.

    It was too big to attach, so here it is on my Google Drive.
    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.

  28. #28

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: VB6 QUESTION: Providing Documentation for your Utility.

    Quote Originally Posted by Elroy View Post
    Ber, that's the kind of thing I'd get stubborn about, and find a way to make it work.
    Elroy, I noticed your balloon tips will not appear when attached to a group of radio option buttons. There is no error just no balloons.

    I have worked around it by having the ordinary everyday tooltips on the radio buttons themselves but replacing the adjacent button text with an additional mini frame to the right hand side containing a new label for each radio button. The balloon tooltip is now attached to the frame and it now shows whenever the text receives a hovering cursor.



    I noticed separate labels by themselves won't take a balloon tooltip either, hence the mini frame for each button's text.

    I do love them, I am just working my way through any interesting side effects, implementing workarounds.

    If you have a better method of making the balloon tooltips appear on radio option buttons I'd be happy to receive it.
    Last edited by yereverluvinuncleber; Nov 8th, 2021 at 01:20 PM.
    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.

  29. #29
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: [RESOLVED] VB6 QUESTION: Providing Documentation for your Utility.

    Hi Ber,

    It all works fine for me. Here's a screenshot of a little test program:

    Name:  Balloons.png
Views: 238
Size:  7.6 KB

    I used the balloon tip BAS code from above, and here's the code I put into Form1:

    Code:
    
    Option Explicit
    
    
    Private Sub Option1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        CreateToolTip Option1.hWnd, "Tooltip text for Option1 (no index)", _
                      TTIconInfo, "The tooltip title", , , , True
    End Sub
    
    Private Sub Option2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        CreateToolTip Option2.hWnd, "Tooltip text for Option2 (no index)", _
                      TTIconInfo, "The tooltip title", , , , True
    End Sub
    
    Private Sub OptionArray_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
        Select Case Index
        Case 0
            CreateToolTip OptionArray(0).hWnd, "Tooltip text for Option Array (index 0)", _
                          TTIconInfo, "The tooltip title", , , , True
        Case 1
            CreateToolTip OptionArray(1).hWnd, "Tooltip text for Option Array (index 1)", _
                          TTIconInfo, "The tooltip title", , , , True
        End Select
    End Sub
    
    
    Be sure you pass in the correct hWnd for the control that'll have the tooltip.

    I also attached my little test project:
    Attached Files Attached Files
    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.

  30. #30

    Thread Starter
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,235

    Re: [RESOLVED] VB6 QUESTION: Providing Documentation for your Utility.

    Once again, strange, I will do more testing to find out why they won't appear on my app. Thanks for the feedback.
    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.

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