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))
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top