Dim txt As WinForm.TextBox = e.Form.Controls("TextBox1") Dim ary() As String = txt.Text.replace(chr(10), "").Split(chr(13)) Dim str As String = "" For Each s As String In ary If s.trim > "" Then s =s.TrimEnd(".").TrimEnd(",").TrimEnd(";").Replace(":","").Replace(";",",").Replace(",",",").Replace("?",",").Replace(".",",")& "." End If str & = " "& s.trim & vbcrlf '行首空格 Next systemready = False Dim i As Integer = e.sender.SelectionStart txt.text = str e.sender.SelectionStart = i systemready = True
|