public static string GetText ()
{
return GetText (TextDataFormat.UnicodeText);
}
Clipboard::GetText ( TextDataFormat format ) : string |
public static string GetClipBoardData() { try { string ClipData = null; Exception e = null; Thread staThread = new Thread( delegate() { try { ClipData = Clipboard.GetText(TextDataFormat.Text); } catch (Exception ex) { e = ex; } }); staThread.SetApartmentState(ApartmentState.STA); staThread.Start(); staThread.Join(); return(ClipData); } catch (Exception) { return(string.Empty); } }