这里的目标是在滚动richtextbox2的同时滚动richtextbox2。 我尝试过...
Dim currentLine As integer=0
Dim index As integer=0
Private sub richtextbox1_textChanged(s as sender,e as eventArgs)handles richtextbox1.textChanged
index=richtextbox1.selectionStart
currentLine=richtextbox.GetLineFromCharIndex(index)
End sub
Private sub richtextbox1_vscroll() handlesrichtextbox.vscroll
Dim i=currentLine+1
Richtextbox2.select(i,1)
Richtextbox2.scrollToCaret()
End sub