Can you show the coding needed to disable the enter key on a textedit box or at the form level?
This form is using multi-line textedit boxes and I would like to prevent the user from pressing the enter key from jumping to the next line in the textedit boxes.
You would add a handler to the text box’s “KeyDown” event and use
KeyEventArgs.SuppressKeyPress— see :http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.suppresskeypress.aspx#Y0
Text boxes also have a
.ReadOnlyproperty which can be set programatically if you need to temporarily (or permanently) prevent the user from changing the content of the box (ie: for display only).