2020年9月1日 星期二

vb.net 複製RichTextBox內容 [Copy RichTextBox Content]

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    Private Sub btnCopys_Click(sender As Object, e As EventArgs) Handles btnCopys.Click
        Dim strText As String = ""
        For Each strL As String In rtbIbf.Lines
            If strL <> "" Then
                strText &= strL & vbCrLf
            End If

        Next
        Clipboard.Clear()
        Clipboard.SetText(strText)
    End Sub

沒有留言:

張貼留言