Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
STAThread
Message
From
17/07/2010 10:07:09
Antonio Llano
Inmollano S.L.
Getxo, Spain
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
STAThread
Environment versions
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2008 Server
Database:
VistaDB
Application:
Desktop
Miscellaneous
Thread ID:
01472790
Message ID:
01472790
Views:
78
Hi,
I have an WPF app that needs to generate a complex report. I create a proggres window in order to wait for the generation. So in the IsVisibleChanged event I run the generation of the report using the background worker;
            BackgroundWorker worker = new BackgroundWorker();
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
            worker.RunWorkerAsync(PK);
The issue is that some of the code to generate the report gives me an error telling me that is not a STAThread thread.

How can I solve It?

Any Idea?

Thanks in advance
Next
Reply
Map
View

Click here to load this message in the networking platform