Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将“richtextbox4 行”拆分为richtextbox1 取行号1
richtextbox2 取行号 2
和 richtextbox3 取第 3 行
所以所有 3 个富文本框都从“richtextbox4 行”中取一行
试试这个代码
For i As Integer = 0 To RichTextBox1.Lines.Count If i = 0 Then RichTextBox2.Text = RichTextBox1.Lines(i) ElseIf i = 1 Then RichTextBox3.Text = RichTextBox1.Lines(i) ElseIf i = 2 Then RichTextBox4.Text = RichTextBox1.Lines(i) End If Next