Solved

TOOLTIP multiline

Posted on 2007-12-03
3
464 Views
Last Modified: 2013-12-25
This is a part of my code...
Now insted to see a tooltip multiline i see from CAMPANIA and NAPOLI a litle square, why????
Iwant:
CAMPANIA
nel line
NAPOLI
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    LDC = GetWindowDC(0)
    Call GetCursorPos(TPOS)
    LCOLOR = GetPixel(LDC, TPOS.X, TPOS.Y)
    SCOLOR = Right$("000000" & Hex(LCOLOR), 6)

    'Me.Label4.Caption = "X: " & tPOS.X & "   Y: " & tPOS.Y

    Me.Label16.BackColor = LCOLOR
    Me.Label16.Caption = SCOLOR

    If TPOS.X >= 440 And TPOS.X <= 450 And TPOS.Y >= 340 And TPOS.Y <= 350 Then
        'Me.Image1.ToolTipText = "CAMPANIA" & vbCrLf & vbCrLf & vbTab & "NAPOLI"
        Me.Text2.Text = " " & "NAPOLI"
        Me.Shape1.FillColor = vbRed
        Me.Label5.Caption = " " & "CAMPANIA": Exit Sub
    Else
        Me.Shape1.FillColor = vbYellow
        Me.Label5.Caption = ""
        Me.Text2.Text = ""
        Me.Image1.ToolTipText = ""
    End If
...........
0
Comment
Question by:sal21
3 Comments
 
LVL 38

Expert Comment

by:PaulHews
Comment Utility
Multiline tooltips are not supported.

You can use a third party solution like:
http://www.freevbcode.com/ShowCode.Asp?ID=1232

Or you can make your own tooltip with a custom form
0
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 500 total points
Comment Utility
Better try like this.
I have used one label control. set its visible property to false.


lbltooltip.BackColor = Me.BackColor
lbltooltip.Left = X
lbltooltip.Top = Y
lbltooltip.Visible = True
lbltooltip.Caption = "This is a very big tooltip. very very big.very very big.very very big.very very big.very very big.very very big.very very big.very very big.very very big.very very big.very very big."
lbltooltip.Width = Image1.Width
lbltooltip.Height = Image1.Height / 2
0
 
LVL 22

Expert Comment

by:danaseaman
Comment Utility
This simple Tooltip class supports multi-line:

http://www.vb-helper.com/howto_multi_line_tooltip.html
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now