473,322 Members | 1,504 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,322 software developers and data experts.

Copy - Paste - Cut commands using VS.NET

Hello,
I am new to programming and I am taking a class on
programming this semester. I am writing a program but I
cannot seem to find out how to copy/paste/cut code to add
so that the text from any of my textboxes can be
cut/copied/pasted to the clipboard. Any help would be
extremely useful. Thank you for all your time.

Asu Student Spring 2004
Jul 21 '05 #1
3 2308
textBox1.Cut
RichTextBox1.Cut
"ASUStudent" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hello,
I am new to programming and I am taking a class on
programming this semester. I am writing a program but I
cannot seem to find out how to copy/paste/cut code to add
so that the text from any of my textboxes can be
cut/copied/pasted to the clipboard. Any help would be
extremely useful. Thank you for all your time.

Asu Student Spring 2004

Jul 21 '05 #2
Cor
Hi

A piece of sampe vb.net code (the only difference with C# is the ";" at the
end of each row, the if statemement and the Dim in the sample)

Copy
\\\
Me.textbox1.SelectAll()
Clipboard.SetDataObject(me.textbox1.SelectedText)
///
Paste
\\\
Dim iData As IDataObject = Clipboard.GetDataObject()
If iData.GetDataPresent(DataFormats.Text) Then
Me.textbox2.Text = CType(iData.GetData(DataFormats.Text), String)
Else
Me.textbox2.Text = ""
End If
///

And a lot of what you ask starts with a description here

http://msdn.microsoft.com/library/en...ardSupport.asp

I hope this helps a little bit?

Cor
I am new to programming and I am taking a class on
programming this semester. I am writing a program but I
cannot seem to find out how to copy/paste/cut code to add
so that the text from any of my textboxes can be
cut/copied/pasted to the clipboard. Any help would be
extremely useful. Thank you for all your time.


Jul 21 '05 #3
Thank you for your help. I should have specified my
statment alittle better. Is it possible to set the .cut
statements up to work off of an active textbox rather than
specifiy the exact one?

Justin
-----Original Message-----
textBox1.Cut
RichTextBox1.Cut
"ASUStudent" <an*******@discussions.microsoft.com> wrote in messagenews:09****************************@phx.gbl...
Hello,
I am new to programming and I am taking a class on
programming this semester. I am writing a program but I
cannot seem to find out how to copy/paste/cut code to add so that the text from any of my textboxes can be
cut/copied/pasted to the clipboard. Any help would be
extremely useful. Thank you for all your time.

Asu Student Spring 2004

.

Jul 21 '05 #4

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

Similar topics

1
by: Justin | last post by:
Hello, My problem is that I am trying to use commands to Cut/Copy/paste text from an active textbox this is because I am calling the commands from the MDIParent. Does anyone know how to allow...
2
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...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
3
by: ASUStudent | last post by:
Hello, I am new to programming and I am taking a class on programming this semester. I am writing a program but I cannot seem to find out how to copy/paste/cut code to add so that the text from...
6
by: Ben R. | last post by:
Hi, I've got a vb.net winforms app. Out of the box, I can use Ctrl X, C and V as expected in controls like textboxes. I've got a menustrip, and if I click the link "Add standard items" which...
1
by: christianlott1 | last post by:
I want to copy an Access pivot table into word with vba. I'm guessing I'd need to Select All, copy to the clipboard, and paste special into word at a bookmark. I know how to address the...
11
by: John | last post by:
Hi In a winform app I need to provide a menu with Cut, Copy and Paste options., What code do I use to accomplish cut, copy and paste features for fields on a winfrom? Thanks Regards
0
by: bbatson | last post by:
Hello, I am trying to dynamically open up a webpage, copy the contents of the webpage (which, in this case, will just be an image") and paste it to a specific cell in an Excel file. The code...
2
by: nelsonbrodyk | last post by:
Hey All, I am trying to implement buttons that follow the command pattern. .NET exposes ApplicationCommands.Cut, copy and paste. I am trying the following: <Button...
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...
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: 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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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: 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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.