473,473 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

copy & paste

NuB
I have a winform and a menu on the form, It allows the users to copy and
paste text from text boxes. I never had to do this before, how can I copy
and paste text from one box to another?

Nov 17 '05 #1
6 2599
I'm not sure if I totally understand what you want to do. Do you want
to programmatically copy and paste? You can get access to the text of
the TextBox through the .Text attribute of the TextBox. That string can
then be copied and pasted. Is this what you are looking for? If not
please explain what your application is a little more.

Nov 17 '05 #2
"NuB" <me@me.com> wrote in message
news:#E**************@TK2MSFTNGP12.phx.gbl...
I have a winform and a menu on the form, It allows the users to copy and
paste text from text boxes. I never had to do this before, how can I copy
and paste text from one box to another?

Copy & paste should be enabled on each TextBox by default. You
shouldn't have to do anything.

--
Truth,
James Curran
[erstwhile VC++ MVP]

Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com

Nov 17 '05 #3
NuB
it is if I right mouse click, I want to copy and paste from an Edit menu
from the tool bar on my form
"James Curran" <ja*********@mvps.org> wrote in message
news:uO**************@tk2msftngp13.phx.gbl...
"NuB" <me@me.com> wrote in message
news:#E**************@TK2MSFTNGP12.phx.gbl...
I have a winform and a menu on the form, It allows the users to copy and
paste text from text boxes. I never had to do this before, how can I copy
and paste text from one box to another?

Copy & paste should be enabled on each TextBox by default. You
shouldn't have to do anything.

--
Truth,
James Curran
[erstwhile VC++ MVP]

Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com

Nov 17 '05 #4
So you want to create an edit menu on the tool bar of your form that
works like the standard "edit" menu on any windows form? If so, do you
need to know how to create that menu, how to actually cut and paste the
text from the textboxes or both?

Nov 17 '05 #5
NuB
i have the menu done, how can i copy and paste from that menu selection?

"Justin" <ju***********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
So you want to create an edit menu on the tool bar of your form that
works like the standard "edit" menu on any windows form? If so, do you
need to know how to create that menu, how to actually cut and paste the
text from the textboxes or both?

Nov 17 '05 #6
You can access the text element of a TextBox with the .Text attribute.
So if you have

TextBox someTextBox = new TextBox();

in the event that gets fired when copy is clicked

private void copyWasClicked(object sender, EventArgs e)
{
string enteredText = someTextBox.Text;
}

Now you've copied from that TextBox, to paste just set the TextBoxes
..Text attribute to the string you want it to be? Let me know if this
helps.

Nov 17 '05 #7

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

Similar topics

0
by: Nelgonde | last post by:
Apologies for the basic nature of this question but I'm very inexperienced in Java. I've been given the task of disabling the cut/copy/paste functions (Ctrl-X,C & V) in our java dialogs and...
1
by: tabonni | last post by:
Hi all I want to create an ASP page, which can copy the real PDF files into the clipboard and then the user can paste it in Outlook message as attachments(it's like inserting attachments) My...
5
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...
1
by: Tomomichi Amano | last post by:
Hello. I was wondering how to paste-copy-cut-delete at a SELECTED SPOT in a textBox. Thanks in advance.
0
by: Mr. Murad Jamal | last post by:
hi guys, I have a textbox & a button in an .aspx page, when I hit the button i want a selected text to be copied to the clipboard AND paste it into the last cursor position on the textbox BOTH AT...
6
by: roopashree | last post by:
hi, currently I am able to cut,copy and paste images for only one image. Suppose I have 4 images-then I should group all the images so that I can cut/copy all 4 images and paste them. How...
6
by: rakeshvthu | last post by:
hi all, can we disable the copy and paste option in edit menu bar of browser my customer does not want copying using any technique so can any one help how to disable that options copy and...
0
by: kavi2012 | last post by:
Hi I used the following function to disable the cut, Copy & paste in the Textbox. It works fine for me when I use ctrl+C,ctrl+X & ctrl+V. function disable(e) { if(event.ctrlKey) { ...
5
by: deve8ore | last post by:
Hello, I have a Word document called (), a named range that will open up a new Word doc dependent on what a user selects in Excel. Could someone please guide me on how to set up VBA code to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.