473,705 Members | 7,096 Online
Bytes | Software Development & Data Engineering Community
+ 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 2624
I'm not sure if I totally understand what you want to do. Do you want
to programmaticall y 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******** ******@TK2MSFTN GP12.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*********@mv ps.org> wrote in message
news:uO******** ******@tk2msftn gp13.phx.gbl...
"NuB" <me@me.com> wrote in message
news:#E******** ******@TK2MSFTN GP12.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.goo glegroups.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.Tex t;
}

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
2634
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 although some of the Bean-based ones have cut, copy and paste functions which can be overloaded, other things which use JTable, JList and the like seem less straightforward. So I was wondering if there was any standard way of tackling this problem?
1
2558
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 idea is: When user checked the checkboxes for the requested PDF files from ASP page and press the "Add To Clipboard" button, all requested PDF files will be copied into clipboard. Then, the user open MS outlook message and right click -> Paste all...
5
4337
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.
1
1704
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
1458
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 ONCE, that means, copying & pasting the text must happen together on the Button_Click event handler! when we use javascript to store the selected text into a variable, we must use this code snippet:
6
3156
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 can I do this? I have used an array to store all the images. If you have any code for this please send it to me or a website link. Else logic as to how am I to Proceed.
6
3742
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 paste in menu bar using java script urgently required loooking for quick response
0
1706
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) { event.returnValue = false; } }
5
23484
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 copy and paste ALL sheets in the Word doc and paste into Excel? The sheets normally contain a graph or two, so if it's a copy & paste special as a picture, that's fine. Any help would be appreciated. Thank you,
0
8690
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
9274
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...
0
8979
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7895
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...
0
4440
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2491
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2083
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.