System.InvalidOperationException: DragDrop registration did not succeed. ---> System.Threading.ThreadStateException:
What does this except
I have encountered this situation recently,[STAThreadAttribute]
is in my case,and i solved this problem by using Invoke method,it might be helpful for you guys,so I share with a little code snippet:
this.Invoke(new InvokeHandler(delegate()
{
//Your method here!
}));
And InvokeHandler is a delegate like this:
private delegate void InvokeHandler();