0

I am new in vb.net please help.

Public Class Form1

    Private Sub RichTextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles RichTextBox1.KeyPress
        
        RichTextBox1.Text = " Not available "
        RichTextBox1.Select(RichTextBox1.Text.Length, 0)

    End Sub
End Class

I want this code to pass not available like" Not available Not available Not available "
Every time the user enter any key " Not available " adds to the string in text box.

2
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by Pgmer
0
Public Class Form1

    Private Sub RichTextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles RichTextBox1.KeyPress
        
        RichTextBox1.Text = RichTextBox1.Text & " Not available "
        RichTextBox1.Select(RichTextBox1.Text.Length, 0)

    End Sub
End Class
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.