473,403 Members | 2,366 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,403 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 2312
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.