473,830 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

paste from clipboard to console-app

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
the user can edit it (just like you can do in command.com and cmd.exe)
Nov 20 '05 #1
2 2934
* "Jarod_24" <ja******@hotma il.com> scripsit:
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
the user can edit it (just like you can do in command.com and cmd.exe)


Have a look at the menthods 'Read' and 'ReadLine' of the 'Console'
class.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:c0******** *****@ID-208219.news.uni-berlin.de...
* "Jarod_24" <ja******@hotma il.com> scripsit:
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 the user can edit it (just like you can do in command.com and cmd.exe)


Have a look at the menthods 'Read' and 'ReadLine' of the 'Console'
class.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

?!

I can't use Read or ReadLine to send text to the console. They are write
protected.

Clipboard -> Console

here's some code

'paste from clipboard out to console-window

'grab what's on the clipboard
Dim p As String =
CType(Clipboard .GetDataObject. GetData(Windows .Forms.DataForm ats.StringForma t
, True), String)

'how to write it to the console?
'Console.Write( p) will print out the text in 'p' but would not let the
user edit the text before he presses enter.

Nov 20 '05 #3

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

Similar topics

5
4352
by: tabonni | last post by:
Hello All I am creating an ASP page. There are a list of filename and checkbox next to it. When user checked all the documents they want and click ADD TO CLIPBOARD button. All filepaths will be copied into clipboard and then they can right-click -> paste into MS Outlook as attachments. How can I use clipboardData.setData function to do that? I saw a lot of examples they are just copy and paste text.
6
3080
by: XmlAdoNewbie | last post by:
Hi All, I would like to put a method for copy, cut and paste into my application and this seems to be easy enough except that it's not working the way i would like it to, I thought someone might be able to give me a bit of insight and for that I say Thank You in advance! this is what I have so far. private void CutText() {
3
43375
by: Tor Inge Rislaa | last post by:
Copy, Cut and Paste How to code the Copy, Cut and Paste functionality in VB.NET. In VB 6.0 I used the following code: 'For Copy Clipboard.Clear Clipboard.SetText ActiveForm.ActiveControl.SelText, vbCFText
5
21043
by: DraguVaso | last post by:
Hi, I'm looking for a way to Copy and Paste Files to the clipboard. I found a lot of articles to copy pieces of text and bitmaps etc, but nog whole files. Whay I need is like you have in windows explorer: when you do a right-click on a file and choose Copy, and than paste it somewhere in my application and vice versa.
3
6691
by: Stilgar[bbs.isca.uiowa.edu] | last post by:
Here's my newbie question: I have several VB forms which are all inherit a standard template form that I made. In my template form, I added a menu bar with some generic cut, copy, and paste functionality. I'd like to have the paste button disabled when the clipboard is empty, but I'm not sure how I should do this. Ideally, I suppose I'd like to constantly monitor the clipboard for data, (in a thread?) but I'm not even sure how I'd...
2
2690
by: Keith | last post by:
I'm trying to come up with a way to create a contextmenu that will do all the "standard" functions (cut, copy, paste, undo, etc). There seems to be a lot of information out there - but nothing seems to work for me. A few people refer to txt.copy() txt.paste(), etc. I'm not sure if those are old functions, but they do not work for me. I've tried textbox1.selectall() - that works in selecting
2
1730
by: Microsoft | last post by:
I'm not sure which control to use for this: I would like the user to be able to paste a list of items into a box and then be able to run through them one at a time. Hopefully there is a control that would place them into an array. I don't want the user to put them in one at a time.. Thanks..
8
2620
by: serge calderara | last post by:
Dear all, I have an treeview control with different node object, I would like to implement the Copy/Paste function of an object . For that I am using the folowing function to copy teh object to clipboard : ====> Private Sub CopyToClipboard(ByVal Obj As PluginApp.PlugInReport) ' Creates a new data format.
17
5142
by: Steve | last post by:
I'm trying to code cut, copy, and paste in vb 2005 so that when the user clicks on a toolbar button, the cut/copy/paste will work with whatever textbox the cursor is current located in (I have about 20 textboxes on the form). Also to ensure that the button can't get used if the cursor isn't in a textbox field. And to ensure the contents of the clipboard are "text" contents that have been cut/copied from one of the textboxes on the form. ...
8
15446
by: jh | last post by:
I'd like to copy/paste into a listbox during runtime. I can do this for a textbox but can't figure out how to accomplish this for a listbox. Any help? Thanks.
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7740
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5777
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3072
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.