Clipboard in console app?

  • Thread starter Thread starter Scott Kilbourn
  • Start date Start date
S

Scott Kilbourn

Hi,

I have a little console app that just does a little bit of processing. The
last thing I want it to do before it exists is stick a string onto the
clipboard. I will then access the clipboard and get the info I need. For
instance, run the console app, and then past the info into a notepad after
it runs. The only problem is that I can't seem to access the clipboard from
a console app.

Is this even possible?

Thanks
 
* "Scott Kilbourn said:
I have a little console app that just does a little bit of processing. The
last thing I want it to do before it exists is stick a string onto the
clipboard. I will then access the clipboard and get the info I need. For
instance, run the console app, and then past the info into a notepad after
it runs. The only problem is that I can't seem to access the clipboard from
a console app.

Add a reference to "System.Windows.Forms.dll", then import the
'System.Windows.Forms' namespace and use the 'Clipboard' class.
 
Excellent! Thank you very much! :)

This is my first console app. I'm used to all that stuff being there for
the windows forms.
 
Back
Top