Results 1 to 6 of 6

Thread: I need a help with tooltip

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    11

    I need a help with tooltip

    I have a tooltip I want to show it while I am typing on a textbox. Is it possible to show tooltip without mouse over?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: I need a help with tooltip

    Thread moved from the FAQ forum, which is not the place to post your questions.

    Welcome to VBForums

    It may be possible, but it would be harder than doing something else instead. What I would recommend is using a Label (set to the ToolTip colours), which you simply show/hide as apt, eg:
    Code:
    Private Sub Text1_GotFocus()
      Label1.Visible = True
    End Sub
    
    Private Sub Text1_LostFocus()
      Label1.Visible = False
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    11

    Re: I need a help with tooltip

    Fist thanks a lot for you reply. But I wanted it to be tooltip coz I have a nice tooltip and it might be over other controls. Who Knows?

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: I need a help with tooltip

    This is one of the worst ways to do it I'm sure. But it may work good enough for you. The ideal way would be to use a class module with CreateWindow() API function (and a lot more APIs) but this is a quick/dirty solution.

    Run the example in VB and type in the TextBox.

    You could also pretty easily add other effects like a drop shadow or something, but you may want to search for "custom tooltip" on www.pscode.com/vb there are some good ones.
    Attached Files Attached Files

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    11

    Re: I need a help with tooltip

    Thanks a lot DigiRev.

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: I need a help with tooltip

    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width