Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows form applications' cut copy paste functionality

Tags:

c#

.net

winforms

I have windows forms application with multiple forms and controls in them. I want if user has selected some text in any control of any form of my application and click on cut/copy/paste button on toolbar operation get performed accordingly.

i m using C#.net's sendkeys.send("^c") on click of copy button but it doesn't work...

OR any 1 can tell if is there any way to get selected text (despite of knowing, which form/control of my application).

Thanks in advance...

like image 832
Muhammad Adnan Avatar asked Jun 09 '10 12:06

Muhammad Adnan


People also ask

What are cut copy and paste features of?

The cut command removes the selected data from its original position, while the copy command creates a duplicate; in both cases the selected data is kept in temporary storage (the clipboard). The data from the clipboard is later inserted wherever a paste command is issued.

How do I copy and paste in Winforms?

cs[Design]) copy the whole Form "ctrl A" then ctrl C. All objects at once. Then add a new windows form to the project. Change the size of the form to the size that you want then paste ctrl V all of the new objects will be copied to the new form.

Does Drag and Drop use the clipboard?

A third option, called Drag and Drop, is also available in some programs and doesn't use either clipboard. This option is quicker to use when the item(s) to copy is in the same vicinity as the destination location.

How do you perform Cut Copy and paste clipboard operations in VB .NET explain with example?

The Cut MenuRun your programme, and select the text in textbox one. From your menu, click Edit > Cut. The text should disappear (it's on the clipboard, though). Click inside textbox two, and click Edit > Paste.


1 Answers

have you used clipboard to copy and paste you data if not than use clipboard for this

check this article for more about clipboard: http://www.geekpedia.com/tutorial188_Clipboard-Copy-and-Paste-with-Csharp.html

like image 50
Pranay Rana Avatar answered Oct 13 '22 13:10

Pranay Rana