1 Attachment(s)
copy highlighted richtextbox text to clipboard vb.net
I'm from Lithuania so do not surprize if you see program in LT version :)
Hi i have only ths code for so far so maby someone will know
how to copy only highlighted text like in the picature shown
Exaple: what i want to copy like so
www.blabla.com/2013
www.ggg.com/2013 and so on to clipboard and other leave as it is not to copy.
Attachment 92647
Here is what i have for so far
It copies only one selected text.
But i want to copy to clipboard only highlighted like in the picture shown
Code:
If RichTextBox1.SelectedText <> "" Then
'Copy the information to the clipboard
Clipboard.SetText(RichTextBox1.SelectedText)
Else
'If no text was selected, print out an error message box
MsgBox("No text is selected to copy")
End If
and this copy all but not in new line
Code:
If True Then
' Check if selection exists and that it's not null
If RichTextBox1.SelectionLength > 0 Then
' Copy the selected text to the Clipboard
Clipboard.SetText(RichTextBox1.Text, TextDataFormat.Text)
End If
End If
Re: copy highlighted richtextbox text to clipboard vb.net
Multiple selection is not possible in a RichTextBox so you've lost me!
Re: copy highlighted richtextbox text to clipboard vb.net
Ok if it is inpossible as you say so maybe you will know how to add highlighted from richtextbox to textbox or listbox from listbox to textbox all selected
I just wanna add only matches not all