PC Review


Reply
Thread Tools Rate Thread

Clipboard in console app?

 
 
Scott Kilbourn
Guest
Posts: n/a
 
      1st Apr 2004
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      1st Apr 2004
* "Scott Kilbourn" <(E-Mail Removed)> scripsit:
> 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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Scott Kilbourn
Guest
Posts: n/a
 
      1st Apr 2004
Excellent! Thank you very much!

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

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:c4hjjo$2hvmbn$(E-Mail Removed)...
> * "Scott Kilbourn" <(E-Mail Removed)> scripsit:
> > 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.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Microsoft Excel Programming 2 6th Mar 2007 12:50 PM
Clipboard gets empty by itself, cleared clipboard, copy paste doesn't work, outlook clears clipboard, problems with clipboard - possible solution Jens Hoerburger Microsoft Outlook 0 24th Aug 2006 02:44 PM
Accessing Clipboard in console Application The.Relinator@gmail.com Microsoft C# .NET 9 20th Aug 2006 07:34 AM
Problems with clipboard : system.runtime.interopservices : The requested clipboard operation failed Dennis Microsoft C# .NET 0 5th Apr 2004 06:43 PM
paste from clipboard to console-app Jarod_24 Microsoft VB .NET 2 8th Feb 2004 07:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 PM.