Copy ListView Items

  • Thread starter Thread starter Dragan Ristic
  • Start date Start date
D

Dragan Ristic

How to select all ListView items and then copy that to clipboard (VB 7)?
Please help.
 
Dragan,

Dragan Ristic said:
How to select all ListView items and then copy that to clipboard (VB 7)?

\\\
Imports System.Text
....
Dim sb As New StringBuilder()
For Each Item As ListViewItem In Me.ListView1.Items
Item.Selected = True
sb.AppendLine(Item.Text)
Next Item
Clipboard.SetText(sb.ToString().TrimStart(ControlChars.Cr, ControlChars.Lf))
///
 
Back
Top