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
Printable View
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
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
Hey thanks. That will do the trick!