STAthread doesn't let me print reports in c#
I have problem with my application. The application starts with login form
then I'm using the following thread to run my application.
Thread t = new Thread(Program.RunApplication);
t.Start();
Thread.Sleep(2000);
but I have problem now when trying to save any of my reports as excel or
pdf it gives me error current thread must be sit to single thread which I
made by adding
[STAThread]
before my Main[] but now I don't really know what is the problem.
Can anybody help please?
No comments:
Post a Comment