Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TOOLTIP multiline

Posted on 2007-12-03
3
Medium Priority
?
474 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 2000 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. 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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

719 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