Clipboard functions...

  • Thread starter Thread starter genc ymeri
  • Start date Start date
G

genc ymeri

How can I copy some data in clipboard through C# ????? How can I tell if
already there are some data (text/image) stored in the clipboard ??????


Thank You.
 
To work with the Clipboard ,you first retrieve an IDataObject interface from
the system Clipboard class
-------------------------------------------------------------------------
IDataObject iData = Clipboard.GetDataObject();
----------------------------------------------------------------------
---------------------------------------------------------------------
Now you have the object , you can iquire of it for a given format of data
you are interested in.
-----------------------------------------------------------------------
Bool hasText = iData.GetDataPresent(DataFormat.Text);
----------------------------------------------------------------------
---------------------------------------------------------------
Now if bool is yes , you want to retrieve from Clipboard
 
Back
Top