private static async Task OpenClipboard() { while (!Win32UnmanagedMethods.OpenClipboard(IntPtr.Zero)) { await Task.Delay(100); } }