locked
Copy and paste without using Clipboard Class RRS feed

  • Question

  • I am developing a winform application using C#. I have menu like Edit -> Copy and Edit -> Paste.

    Instead of using     Clipboard class to do copying and pasting can I use Operating System's ability to Copy and Paste text, image, link, etc...


    markand

    Thursday, April 3, 2014 1:51 PM

Answers

All replies

  • The OS itself uses the Clipboard as a mechanism to copy/paste and the Clipboard class is used to do the same via code :)

    Thursday, April 3, 2014 2:06 PM
  • May be yes. Thats why i want to utilize that code instead of writing my code to copy and paste using Clipboard.

    For example when we press ctrl+c irrespective of data type OS copies and pastes it.

    I want to implement such generic copying and pasting functionality.

    If have to write code to do so, it will be a headache.

    So i m searching a way to do it as easily as possible.


    markand

    Thursday, April 3, 2014 2:18 PM
  • the only way to "implement" this is via the Clipboard class & its pretty simple anyways! Please see the example in http://msdn.microsoft.com/en-us/library/system.windows.forms.clipboard(v=vs.110).aspx

    Hope this helps!

    Thursday, April 3, 2014 2:25 PM