469,323 Members | 1,238 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

How to copy selected listview items using clip board in VB.NET

Hi

I have some items in listview.
I want to copy the selected items from listview using the
clip board mechanism in VB.NET.
I used this code but it was not copied.

For Each lsvrow As ListViewItem In ListView1.SelectedItems
Clipboard.SetDataObject(lsvrow)
Next

What is the problem in this code,please give me the
solution.
How can i copy through VB.NET code.
Mamatha
Nov 21 '05 #1
1 7536
"Mamatha" <ma***********@yahoo.com> schrieb:
I have some items in listview.
I want to copy the selected items from listview using the
clip board mechanism in VB.NET.
I used this code but it was not copied.
\\\
Dim s As String
///
For Each lsvrow As ListViewItem In ListView1.SelectedItems
\\\
s &= lsvrow.Text & ControlChars.NewLine
///
Next


\\\
Clipboard.SetDataObject(s)
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by CaffeineRush | last post: by
7 posts views Thread by GTi | last post: by
4 posts views Thread by Bill-R | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.