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...
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With