// SET GET CLIPBOARD CONTENTS public static void SetText(string text)// {{{ { //log("SetText(text):"); ClipboardAsync instance = new ClipboardAsync(); instance.text_to_set = text; Thread thread = new Thread(instance.instance_setText); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); }
// }}} // THREADED INSTANCE public static string GetText(TextDataFormat format)// {{{ { //log("GetText(format):"); ClipboardAsync instance = new ClipboardAsync(); Thread thread = new Thread(instance.instance_getText); thread.SetApartmentState(ApartmentState.STA); thread.Start(format); thread.Join(); return(instance.text_to_get); }