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.
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.