|
This is very simple. This is not the actual code, I have converted it to basic statements for the ease of understanding and time saving.
public void Start()
{
Thread t = new Thread(new ThreadStart(this.CheckWindow));
t.Start();
}
public void CheckWindow()
{
Form1 f = new Form1();
f.Show();
}
The new thread t would start executing the given function CheckWindow(), but will not be able to create the window and will throw the STA error.
__________________
Please login or register to view this content. Registration is FREE
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups | Uptime Guarantee | Affiliates - $50 Per Sale | Please login or register to view this content. Registration is FREE
|