Textbox - Select All (Ctrl+A) and Scroll Visual Basic {VB.net}

Here are all the codes:

Alright so first of all, u insert one textbox in your form and then u go into the events and choose Keypress event of the textbox and in the code u type in:

Codes:

Public Class Form1

Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Convert.ToChar(1) Then
DirectCast(sender, TextBox).SelectAll()
e.Handled = True
End If
End Sub

End Class


Comments