2020年5月24日 星期日

vb.net 刪除Richtextbox指定行 [Delete select RichTextBox line]

1
2
3
4
5
6
7
8
    Private Sub DelLine(ByVal rtb As RichTextBox, ByVal intIndex As Integer)
        Dim myList As List(Of String) = rtb.Lines.ToList()
        If myList.Count > 0 Then
            myList.RemoveAt(intIndex)
            rtb.Lines = myList.ToArray()
            rtb.Refresh()
        End If
    End Sub

沒有留言:

張貼留言