2020年5月17日 星期日

vb.net Textbox 加入快速鍵功能 (Ctrl + S, Ctrl + A) [TextBox ShortKey]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    Private Sub txtContent_KeyDown(sender As Object, e As KeyEventArgs) Handles txtContent.KeyDown

        If e.Control And e.KeyCode = 83 Then

            btnSave.PerformClick()

        ElseIf e.Control And e.KeyCode = 65 Then

            txtContent.SelectAll()

        End If

    End Sub

沒有留言:

張貼留言