Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1") Dim ary() As String = txt.Text.Split(chr(13)) Dim str As String = "" For Each s As String In ary If s <> chr(10) Then str &= " " & s.trim & vbcrlf '行首空格 str &= vbcrlf & "" End If Next txt.text = str