block number of lines in a textbox

  • Thread starter Thread starter Fabio
  • Start date Start date
F

Fabio

Hi all,

How can I block the number of lines that the user entered in a texbox, I
need that the user enter only 4 lines of text.

how can I block this and not permit that the user copy other text with more
than 4 lines into the textbox too.

Thanks in advance,

Fabio
 
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChange
If TextBox1.Lines.Length > 4 The
Dim newLines(3) As Strin
For i As Integer = 0 To
newLines(i) = TextBox1.Lines(i
Nex
TextBox1.Lines = newLine
End I
End Sub
 
Back
Top