I am developing a windows application in which I am calling a dialog window in a thread. When I minimize the Dialog, it not only minimize but also closes. Why it is showing this kind of behaviour? The code i used is: On Form1: private void button1_Click(object sender, System.EventArgs e) { Thread td = new Thread(new ThreadStart(initiateForm2)); td.Start(); } private void initiateForm2() { Demo frm2 = new Demo(); this.Hide(); frm2.ShowDialog(); } On Form2: private void btnMinimize_Click(object sender, System.EventArgs e) { this.Hide(); } The problem is that when I hide the second form, it also call the Closing event of the Dialog form. It closes the dialog window. Why it is so?
Thanks, Sandeep S. Sekhon