Consulting

Results 1 to 5 of 5

Thread: Clean way to create popup help balloons

  1. #1

    Clean way to create popup help balloons

    I am on the hunt for a good/easy way to generate a "help balloon" when i mousemove over a text label (a textlabel on my VBA form) and then disappear by timer, I assume thats thats the most pain free method?

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    I assume that you just want static help for those labels?

    Go into the userform, click your label, and enter something in the ControlTipText field of the Properties window. That should give you the effect you want, no code needed.

    It can, of course, be changed at run time by modifying the ControlTipText property as well.

    HTH,
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  3. #3
    Yeah thanks thats easy enough, do you mean that i can make the control tip stay on screen for longer?

  4. #4
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Not that I'm aware of, no. This will show the tip so long as the user hovers their mouse over it, but then it goes away.

    If you want to time it out longer, you could try using an API to capture a "MouseOver" event, but it may be way more pain than it's worth. Does depend on your application and reasons, though.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  5. #5
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Actually...

    Based on a quick Google search for "MouseOver VB", I found some code that will change the colour and font of the label1 as you move over/off it. You could probably tweak it to use an OnTime to display a message in another label and set it to invisible when you are done with it:

    [vba]Private Sub Label1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    With Label1
    .BackColor = vbGreen
    .FontSize = 12
    End With
    End Sub

    Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    With Label1
    .BackColor = vbYellow
    .FontSize = 8
    End With
    End Sub[/vba]
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





Posting Permissions

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