'窗体放Text1(MultiLine设置为True,ScrollBars 设置为2)和Text2(MultiLine设置为True,ScrollBars 设置为3),一个Command1
Private Sub Form_Load()
Text2.Move Text1.Left, Text1.Top, Text1.Width, Text1.Height
blnNewLine = False
Text1.Visible = False '默认不自动换行(让不自动换行的控件在上面)
End Sub
Private Sub Text1_Change()
Text2.Text = Text1.Text
End Sub
Private Sub Text2_Change()
Text1.Text = Text2.Text
End Sub
Private Sub Command1_Click() '自动换行切换
If Text1.Visible = True Then
Text1.Visible = False
Text2.Visible = True
Else
Text1.Visible = True
Text2.Visible = False
End If
End Sub
温馨提示:答案为网友推荐,仅供参考