Copy text to user's "copy" cache

  • Thread starter Thread starter Eric Sabine
  • Start date Start date
E

Eric Sabine

During a process in an app, I have a string created in code that I want
automatically saved in the user's cache so he can move to another program
and do a CTRL-V (or paste). This is easy I'm sure, but it's eluding me.

Eric
 
Eric Sabine said:
During a process in an app, I have a string created in code that I
want automatically saved in the user's cache so he can move to
another program and do a CTRL-V (or paste). This is easy I'm sure,
but it's eluding me.

You want to copy the string into the clipboard? Use

System.Windows.Forms.Clipboard.SetDataObject(YourString, True)

or only

Clipboard.SetDataObject(YourString, True)

because System.Windows.Forms is usually imported by default.
 
Back
Top