How to handle blocked Clipboard
Exception : The Clipboard could not be cleared.
This typically occurs when the Clipboard is being used by another process.
Solution for this is, retry the clear() again after a delay.
private void ClearClipBoard()
{
try
{
System.Threading.Thread.Sleep(10000);
Clipboard.Clear();
}
catch (Exception ex)
{
ClearClipBoard();
}
}
Add a comment