How to: View Multiple Lines in the Windows Forms TextBox Control
By default, the Windows Formscontrol displays a single line of text and does not display scroll bars. If the text is longer than the available space, only part of the text is visible. You can change this default behavior by setting the , , and properties to appropriate values.
To display a carriage return in the TextBox control
To display a carriage return in a multi-line TextBox, use theproperty.
Be aware that the interpretation of escape characters (\) is language-specific. Visual Basic uses Chr$(13) & Chr$(10) for the carriage return and linefeed character combination.
To view multiple lines in the TextBox control
Set the Multiline property to true. If WordWrap is true (the default), then the text in the control will appear as one or more paragraphs; otherwise it will appear as a list, in which some lines may be clipped at the edge of the control.
Set the ScrollBars property to an appropriate value.
Use this value if the text will be a paragraph that almost always fits the control. The user can use the mouse pointer to move around inside the control if the text is too long to display all at once.
Use this value if you want to display a list of lines, some of which may be longer than the width of the TextBox control.
Use this value if the list may be longer than the height of the control.
Set the WordWrap property to an appropriate value.
Text in the control will not automatically be wrapped, so it will scroll to the right until a line break is reached. Use this value if you chose Horizontal scroll bars or Both, above.
The horizontal scrollbar will not appear. Use this value if you chosescroll bars or None, above, to display one or more paragraphs.