Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox Control select all items issue

Status
Not open for further replies.

adamw007

Programmer
Joined
Apr 23, 2004
Messages
2
Location
GB
Hi all - I am a newby to .Net and am trying to build a simple windows application. I have 2 text boxes, a listbox and 2 buttons. When the 2 text boxes have been populated and the ADD button clicked, tne values in the textboxes are displayed in the listbox. I have used a listbox as I want the user to be able to add multiple entires (rows) to the listbox. Once the user has entered as much info as they require I want them to be able to click the second (copy) button and all of the information that is currently in the listbox to be copied to the clipboard and then pasted into a text file in exactly the same format.

I have nearly all of this working and can copy static values to the clipboard, but I am really struggling to copy the contents of the listbox to the clipboard. I am using the following to paste to the clipboard:

Clipboard.SetDataObject(Me.myListBox.Items)

Any help would be greatly appreciated.

Thanks in advance,

AdamW007.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top