Oh I know what happen.
Because I put long running procedure in the Modal form.
in MainForm:
Form2 frm = new Form2();
frm.ShowDialog(this);
in Form2_Load(..,..){
this.Visible = true;
// long running part it take about 1 minute or more
// during this period I can click on the parent form and event close it.
// try it out you will see.
this.Close();
}
"Sreekanth" <sr*******@yahoo.com> wrote in message
news:ce**********@news.mch.sbs.de...
Can you send your code snippet please? Because I dont have any problem in
using ShowDialog.
Sree
"kids_pro" <ki******@yahoo.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl... Hi there,
I want to create a Modal dialog from.
Normally in vb it won't allow to click the parent form.
But I tried that in C# using form.ShowDialog(this);
I still can click on the mainForm event close the main form.
Does anyone know the trick of this?
Cheers,
Kids