How do I add a newline to a windows-forms TextBox?

后端 未结 14 430
温柔的废话
温柔的废话 2021-01-01 09:37

I am trying to add a line of text to a TextBox component in VB.net, but I cannot figure out for the life of me how to force a new line. Right now it just adds onto what I ha

相关标签:
14条回答
  • 2021-01-01 10:40

    You can also use vbNewLine Object as in

    MessageLabel.Text = "The Sales tax was:" & Format(douSales_tax, "Currency") & "." & vbNewLine & "The sale person: " & mstrSalesPerson
    
    0 讨论(0)
  • 2021-01-01 10:42

    You can try this :

    "This is line-1 \r\n This is line-2"

    0 讨论(0)
提交回复
热议问题