Copying to clipboard

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can I copy some text to the clipboard so it can be pasted into other
apps?

Thanks

Regards
 
Hi John,

Copy
\\\
Me.textbox1.SelectAll()
Clipboard.SetDataObject(me.textbox1.SelectedText)
///
Paste
\\\
Dim iData As IDataObject = Clipboard.GetDataObject()
If iData.GetDataPresent(DataFormats.Text) Then
Me.textbox2.Text = CType(iData.GetData(DataFormats.Text), String)
Else
Me.textbox2.Text = ""
End If
///
I hope this helps a little bit?

Cor
 
Armin,
I think too, but it was there I did not know it till now, I was used that
there was an win32 example.
Saved it of course
:-)
Cor
 
In VB You have a intrinsic object called CLIPBOARD and it has its
methods such as SetObjectData and GetObjectData for you to store
something into the clipboard and later retrieve it.



Keyur Shah
Verizon Communications
732-423-0745
 

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