Ejemplo n.º 1
0
        public static void SetText(string text)
        {
            var instance  = new ClipboardAsync();
            var staThread = new Thread(instance.ThSetText);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start(text);
            staThread.Join();
        }
Ejemplo n.º 2
0
        public static string GetText(TextDataFormat format)
        {
            var instance  = new ClipboardAsync();
            var staThread = new Thread(instance.ThGetText);

            staThread.SetApartmentState(ApartmentState.STA);
            staThread.Start(format);
            staThread.Join();
            return(instance._getText);
        }