JadeWolf324 Posted October 1, 2004 Share Posted October 1, 2004 i need to make this box return a newline after something is added. ie: txtreview.text = "Customer Name:" & " " & txtcustomername.text & vbcrlf vbcrlf used to be the command in VB6 to create a new line...but what is it in .NET? Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted October 1, 2004 Share Posted October 1, 2004 Environment.NewLine Link to comment Share on other sites More sharing options...
0 JadeWolf324 Posted October 1, 2004 Author Share Posted October 1, 2004 Environment.NewLine ah i just found it! you can also do ControlChars.NewLine or ControlChars.crlf Link to comment Share on other sites More sharing options...
0 bangbang023 Veteran Posted October 1, 2004 Veteran Share Posted October 1, 2004 vbcrlf works in vs 2003 for me. Link to comment Share on other sites More sharing options...
0 Steven Posted October 1, 2004 Share Posted October 1, 2004 vbcrlf works in vs 2003 for me. there's also the char(20) i think.. :unsure: I dunno I remember using a char(x) for a messagebox... :unsure: Link to comment Share on other sites More sharing options...
0 Liquid Posted October 1, 2004 Share Posted October 1, 2004 Steve isn't it chr(13) ? Link to comment Share on other sites More sharing options...
0 John Veteran Posted October 1, 2004 Veteran Share Posted October 1, 2004 chr(10) + chr(13) :p Or VbCrLf, or ControlChars.something (I don't remember) :p Link to comment Share on other sites More sharing options...
0 Steven Posted October 1, 2004 Share Posted October 1, 2004 chr(10) + chr(13) :pOr VbCrLf, or ControlChars.something (I don't remember) :p i was close enough :p trial and error ;) Link to comment Share on other sites More sharing options...
0 John Veteran Posted October 1, 2004 Veteran Share Posted October 1, 2004 trial and error ;) Definitely :whistle: That's all I do :dontgetit: Link to comment Share on other sites More sharing options...
0 SoftContest Posted October 1, 2004 Share Posted October 1, 2004 I think you need to reference the Microsoft.VisualBasic (was that it? I haven't used VB.NET in a while) assembly if you want to have 'vbCrLf' back. It should be referenced by default in VB.NET projects, but who knows. Anyway, I find that it's a better programming practice to use a common .NET constant such as Environment.NewLine, because ControlChars and vbCrLf are Visual Basic exclusive. Link to comment Share on other sites More sharing options...
0 Mordkanin Posted October 1, 2004 Share Posted October 1, 2004 I use VbNewLine. Link to comment Share on other sites More sharing options...
Question
JadeWolf324
i need to make this box return a newline after something is added.
ie:
vbcrlf used to be the command in VB6 to create a new line...but what is it in .NET?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts