2020年5月24日 星期日

VB.NET 在TextBox按Enter [TextBox active Enter key]


1
2
3
4
5
6
    Private Sub txtPassword_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtPassword.KeyPress
        If e.KeyChar = ChrW(Keys.Enter) Then
            e.Handled = True
            MsgBox("OK")
        End If
    End Sub

沒有留言:

張貼留言