private void button1_Click(object sender, EventArgs e) { formthread = new Thread(new ThreadStart(delegate() { form = new ShadowPrefsForm2(this, this.shadowPlug); Application.Run(form); })); formthread.SetApartmentState(ApartmentState.STA); formthread.Start(); }