473,550 Members | 2,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Copy, Paste and Cut in C#?


How can I add copy paste and cut to my browser in C#? I have the menu items
labeled Copy, Paste and Cut. Now I just need the code?

Dec 11 '05 #1
3 9221

Check out http://www.codeproject.com/csharp/clipboard01.asp

Regards - Octavio

"Mateusz Rajca" <Ma**********@d iscussions.micr osoft.com> escribió en el
mensaje news:77******** *************** ***********@mic rosoft.com...

How can I add copy paste and cut to my browser in C#? I have the menu
labeled Copy, Paste and Cut. Now I just need the code?


Dec 11 '05 #2
Hi Mateusz,

I suppose you mean copying from a Internet explorer.
You will have to do this using javascript and the internal internet explorer
features (don't know about mozilla)

The command you are looking for is execCommand("Co py");

I found a small tutorial for you :

Kind Regards
Rainier van Slingerlandt
(Freelance trainer/consultant/developer)
"Mateusz Rajca" wrote:

How can I add copy paste and cut to my browser in C#? I have the menu items
labeled Copy, Paste and Cut. Now I just need the code?


Dec 12 '05 #3

Not clear what you want, in any case you have a Clipboard class in .net
take a look at it and if it does not fit your need, just post back with more


Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mateusz Rajca" <Ma**********@d iscussions.micr osoft.com> wrote in message
news:77******** *************** ***********@mic rosoft.com...

How can I add copy paste and cut to my browser in C#? I have the menu
labeled Copy, Paste and Cut. Now I just need the code?


Dec 12 '05 #4

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

Similar topics

by: Legendary Pansy | last post by:
I was checking out the 101 C# Samples, specifically Windows Forms - Use the Clipboard. I took a look at the code for a while, and I understand what the program is doing with the cut, copy, pasting via the file menu events using the clipboard. However, what I don't get is how is the program able to produce a context menu in the textbox area. When...
by: Rachel Suddeth | last post by:
This may not be the right forum, but it's a problem I chiefly come across when trying to post here. When I do a copy/paste from VS, the text always looks really weird (and even if I'm in an editor that's supposed to be doing plain text, it looks like it's in a different font -- and of course you can't change the font in a plain text...
by: Matt | last post by:
Hello, I have a copy button and a paste button. What code should I add to the copy button and the paste button to do it's work? Thanks, Matt
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 is proving to be more difficult. These pictureboxes are bound to an AccessDB. If the user wants to add an image, they select an image using an...
by: jshoffner | last post by:
This sounds like a really silly question but I'm can't find a solution anywhere. I use the Search window within VS.NET 2003 all the time. However, when I find a sample that is usefull I would like to just copy that bit of code and paste into another window. I highlight what I'm wanting to copy and then CTRL-C (or Edit>Copy or Copy button...
by: Kaur | last post by:
Hi, I have been successful copying a vba code from one of your posts on how to copy and paste a record by declaring the desired fields that needs to be copied in form's declaration and creating two button "copy" and "paste". Works like magic. My problem is how can I copy multiple records and paste them at the same time. My data entry form has...
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 adds Cut copy and paste commands, this functionality no longer works. It seems now I need to implement handlers for these functions. I tried to do so,...
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...
by: phill86 | last post by:
Hi I have a main form that holds records for scheduled meetings, date time location etc... in that form i have a sub form that has a list of equipment resources that you can assign to the meeting in the main form. I have two buttons in the sub form one for selecting and copying all the records and another for pasting the records this enables me to...
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.
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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...
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. ...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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...

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.