Solved

TOOLTIP multiline

Posted on 2007-12-03
3
467 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Restricting text box entry from \/:?<>"| 9 87
Macro Excel - Multiple If conditions 2 72
Create Files based on Cell Values in a Range in Excel 12 41
Automatic Email Reminder 4 38
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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