Solved

TOOLTIP multiline

Posted on 2007-12-03
3
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

623 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