none
MouseEnter with a NumericUpDown RRS feed

  • Question

  • I am using the MouseEnter and MouseLeave events in my form as crude help tips. I acts as expected with Buttons, ComboBoxes and CheckBoxes but with a NumericUpDown, it only triggers when the mouse is exactly on the border of the control whereas all others trigger as long as the Mouse Pointer is 'inside' the control. Is this intentional ? Is there a workaround ?
        Private Sub NUDSize_MouseEnter(sender As Object, e As EventArgs) Handles NUDSize.MouseEnter
            If ShowTips Then
                TxtStatus.Text = "This changes the size of each letter box"
            End If
        End Sub
    
        Private Sub NUDSize_MouseLeave(sender As Object, e As EventArgs) Handles NUDSize.MouseLeave
            If ShowTips Then
                TxtStatus.Clear()
            End If
        End Sub

    ShowTips is a Boolean
    Saturday, November 3, 2018 1:23 AM

Answers

  • Hi

    Just in case you are not familiar with the inbuilt ToolTip, here is a simple example.

      Dim MyToolTip As New ToolTip
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        With MyToolTip
          .SetToolTip(NumericUpDown1, "Help provided for free for this wonderful NumericUpDown control.")
          .SetToolTip(Button1, "Help provided at a small cover charge of $22.95")
          .SetToolTip(TextBox1, "Help is provided on a first come first served basis - just wait your turn!")
          .IsBalloon = True
          .AutoPopDelay = 2000
          .InitialDelay = 0
        End With
    Using this would likely simplify things for you.


    Regards Les, Livingston, Scotland

    • Marked as answer by Devon_Nullman Saturday, November 3, 2018 3:56 AM
    Saturday, November 3, 2018 2:30 AM

All replies

  • Hi

    Just in case you are not familiar with the inbuilt ToolTip, here is a simple example.

      Dim MyToolTip As New ToolTip
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        With MyToolTip
          .SetToolTip(NumericUpDown1, "Help provided for free for this wonderful NumericUpDown control.")
          .SetToolTip(Button1, "Help provided at a small cover charge of $22.95")
          .SetToolTip(TextBox1, "Help is provided on a first come first served basis - just wait your turn!")
          .IsBalloon = True
          .AutoPopDelay = 2000
          .InitialDelay = 0
        End With
    Using this would likely simplify things for you.


    Regards Les, Livingston, Scotland

    • Marked as answer by Devon_Nullman Saturday, November 3, 2018 3:56 AM
    Saturday, November 3, 2018 2:30 AM
  • Indeed it did, thanks.
    Saturday, November 3, 2018 3:57 AM