日期:2014-05-19  浏览次数:20790 次

How to determine is there any data stored on the clipboard in C#?
How   to   determine   is   there   any   data   stored   on   the   clipboard   in   C#?
Many   thanks   for   your   replying.


------解决方案--------------------
Using "Clipboard.GetDataObject " method.
Sample code as follows:
IDataObject idata = Clipboard.GetDataObject();
if( idata != null )
{
//there are some data stored in clipboard
}