Friday, April 30, 2010

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

Hi all today i will be showing u all how to select all text in a textbox and also how to make a ur text scroll in the textbox

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
_________________________________________________________________________
Here is the video tutorial:

No comments:

Post a Comment