Morning all, What is the best way to cancel or stop a new line when you press the enter key in a Rich Text Box? Thanks Mojo
RENT-A-CROWD
in the keydown event vb Code: Private Sub RichTextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown If e.KeyCode = Keys.Enter Then e.SuppressKeyPress = True End If End Sub dont know if it is the best way :S
Private Sub RichTextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RichTextBox1.KeyDown If e.KeyCode = Keys.Enter Then e.SuppressKeyPress = True End If End Sub
Hey thanks. That will do the trick!
Forum Rules