Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add tooltip (6.0)

    this is a part of code.
    How to add tooltip with 2 lines on cursor mouse when the code go in call tootip?

    Label4.Caption = "X: " & tPOS.x & " Y: " & tPOS.y

    If tPOS.x >= 440 And tPOS.x <= 460 And tPOS.y >= 340 And tPOS.y <= 360 Then
    'Call TOOLTIP
    Me.Label5.Caption = "CAMPANIA": Exit Sub
    Else
    Me.Label5.Caption = ""
    End If

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add tooltip (6.0)

    I'm not sure I understand what you mean, but does this do what you want?

    Me.Label5.Caption = "CAMP" & vbCrLf & "ANIA"

    Make sure that the label is high enough to display two lines.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add tooltip (6.0)

    I cannot help with that.

  4. #4
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add tooltip (6.0)

    Tk Hnas but not really i want..
    In effect if you see the map of Italy i have insert a shape for each city in region.
    Now when i go with mouse on one of this shape i want to attach on cursor the tooltip with two line...
    Use shape1 for test.
    Note: comment the part wehre caall the acces mdb..

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add tooltip (6.0)

    Hummmmm...
    Hans see when i use: Me.Image1.ToolTipText = "CAMPANIA" & vbCrLf & "NAPOLI"

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add tooltip (6.0)

    Apparently you need to use SendMessage with the TTM_SETMAXTIPWIDTH message to set the maximum width of the tooltip window, but I have no idea how to do that.

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Add tooltip (6.0)

    Sal

    Try this Multi Line Tooltip class compatible with VB5 and VB6

    http://www.planet-source-code.com/vb/scrip...d=7968&lngWId=1

    I haven't tested it as I do not have VB6 installed on my laptop but the cls file looks OK. Buona Fortuna
    Jerry

  8. #8
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add tooltip (6.0)

    I can vouch for the code working with VB6 - I've used it numerous times. Minimal effort required to implement.

    Alan

Posting Permissions

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