Button1_KeyUp

Why it doesn't work when I quite hold of button1

Private Sub Button1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyUp

MsgBox("Button1 is up")

End Sub

Thanks



Answer this question

Button1_KeyUp

  • Al6200

    I suspect you are confusing KeyUp and MouseUp.
  • Adam Christopher

    Private Sub Button1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyUp

    MessageBox.Show("Enter key just released Button 1")

    End Sub

    Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp

    MessageBox.Show("Mouse just released Button 1")

    End Sub



  • akram badr

    Thank you. I understand now.
  • Sarosh79

    Thank you, DMan1 . It works.

    Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp

    MsgBox("Button1 is up")

    End Sub


  • chialee

    It's possible but I don't know to do it.
  • Button1_KeyUp