DragDrop registration failed

That's not easy to answer....
I'm developing an AddIn for Word2000
There everything works fine.

Additional to that I have a simple EXE. This EXE opens word and then uses my AddIn. Two of my forms causes the described error. Therefore I'm not sure, if any code would help. My guess is, that it may be caused by the toolbar which is on both forms. I have other forms within my AddIn which have no toolbar and those forms all work.

Heike
 
Maybe this can help anyone to give me a hint...

The original message is:
************** Exception Text **************
System.InvalidOperationException: DragDrop registration failed. ---> System.Threading.ThreadStateException: The current thread must set to Single Thread Apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it.
 
By context, I mean what is it you're developing? Is this something that supports DragDrop (by your original message header) or is it something to do with OLE Automation? And when does your error occur? As soon as your object loads or some time later, during an event or method call?

-Nerseus
 
It seems like I solved the problem a few minutes ago.
I set the property AllowDrop of my toolbar to FALSE and until now the error hasn't occured any more...
 
Back
Top