salvatore imparato
asked on
TOOLTIP multiline
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
...........
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
...........
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This simple Tooltip class supports multi-line:
http://www.vb-helper.com/howto_multi_line_tooltip.html
http://www.vb-helper.com/howto_multi_line_tooltip.html
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