473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Clipboard in console app?

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
Nov 20 '05 #1
2 5513
* "Scott Kilbourn" <sk*******@nospamplease.appliedsystems.com> 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/>
Nov 20 '05 #2
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]" <hi***************@gmx.at> wrote in message
news:c4*************@ID-208219.news.uni-berlin.de...
* "Scott Kilbourn" <sk*******@nospamplease.appliedsystems.com> 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/>

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: keith | last post by:
I can use following codes to set and get object (serializable class) from Clipboar Clipboard.SetDataObject(obj) then DataObject data=new DataObject()...
0
by: Christopher | last post by:
Hello, First, I appologize for the length but I want to get all the facts down so as not to waste any time :) I'm trying to allow the user of my C# app to copy a DataGrid full of double values...
3
by: Bill Belliveau | last post by:
Hello all I have the need to copy something to the clipboard via 3rd party type library and then pick it up on the .NET side via the clipboard (all server-side). To complicate the issue, the...
2
by: Jarod_24 | last post by:
I'm working on a console-view for my application wich is kinda a replacement for the orignal cmd.exe in windows xp. I could simply use .Write() to do that, but how do i paste the text so that...
9
by: Tim Frawley | last post by:
I have converted a VB6 application to VB.NET. The old application made extensive use of the Clipboard for copying an Image Name so that it could be pasted into the image capture app when the user...
2
by: Scott Kilbourn | last post by:
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...
9
by: The.Relinator | last post by:
I need to retrieve a string from the clipboard in a console application, I have tried many methods but all seem to return a null value, any help regarding this issue would be greatly appreciated
15
by: Peter Duniho | last post by:
I'm trying to use .NET and C# to draw a metafile copied to the clipboard by another application (Word 2003 in this case, but it shouldn't matter). I naively thought that I'd be able to use the...
3
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i'm using the following in my console app: My.Computer.Clipboard.SetText(sb.ToString()) i'm getting inconsistent results with the copy. sometimes it works and most of the time i get...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.