Solved

TOOLTIP multiline

Posted on 2007-12-03
3
466 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
ID: 20395527
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
ID: 20395602
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
ID: 20397413
This simple Tooltip class supports multi-line:

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

861 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

28 Experts available now in Live!

Get 1:1 Help Now