Results 1 to 5 of 5

Thread: [RESOLVED] Using mouse hover to display text?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2015
    Posts
    20

    Resolved [RESOLVED] Using mouse hover to display text?

    I'm trying to write a program in VB 2010 for my computing project.
    The program is essentially a site that allows you to login/ register and once on the site you can access a Spanish Educational game with a selection of 5 different topics.

    My issue here is that on the "Topics Form" I want there to be the 5 buttons that, when hovered over, display a description of the topic in a label to the right of the buttons.

    I have been looking for a while and only come across Tooltips, which are useful but not what I am looking for.


    Any guidance here would be much appreciated and I hope that I have made it clear enough.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Using mouse hover to display text?

    No, you haven't made it clear at all... text that appears when you hover over something ARE tooltips...

    So what's the problem?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2015
    Posts
    20

    Re: Using mouse hover to display text?

    Tooltips are like notes that appear when you hover over the button. I want the text to appear in a specified label.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Using mouse hover to display text?

    Ooooh... well then... even easier actually - use the MouseHover to set it and the MouseLeave to reset it...

    Code:
        Private Sub Button1_MouseHover(sender As Object, e As EventArgs) Handles Button1.MouseHover
            Label1.Text = "AAAAH! Get it off! Get it off!"
        End Sub
    
        Private Sub Button1_MouseLeave(sender As Object, e As EventArgs) Handles Button1.MouseLeave
            Label1.Text = "Rest..."
        End Sub
    End Class
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2015
    Posts
    20

    Re: Using mouse hover to display text?

    That's perfect thanks!
    I also appreciate the humour, +rep

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