An object-oriented programming language developed by Microsoft that can be used in .NET.
Hi @OSVBNET ,
If you want to use the Enter key to wrap lines, you need 10 instead of 13.
Private Sub MessageTextBox_TextChanged(sender As Object, e As EventArgs) Handles MessageTextBox.TextChanged
Dim FileNameFilter As String = ""
For MyLoop = 0 To MessageTextBox.TextLength - 1
Select Case Convert.ToInt32(MessageTextBox.Text.Chars(MyLoop))
Case 32, 45, 46, 48 To 57, 64, 65 To 90, 97 To 122, 10
FileNameFilter = FileNameFilter + MessageTextBox.Text.Chars(MyLoop)
End Select
Next
MessageTextBox.Text = FileNameFilter
MessageTextBox.SelectionStart = MessageTextBox.TextLength
End Sub
Best Regards.
Jiachen Li
----------
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.