Clipboard and STAThreadAttribute
am 10.10.2007 23:48:25 von Fir5tSightI got the error when I execute the following line of code:
Clipboard.SetDataObject(mGrid.Clip);
The error is:
"Current thread must be set to single thread apartment (STA) mode
before OLE calls can be made. Ensure that your Main function has
STAThreadAttribute marked on it."
FYI, I started a separate thread and defined a "Run" method and that's
where I got the error. I don't have to do it this way. However, just
curious why this doesn't work. I'm dying to know why.