I want to disable a form after opening a new one in front of it and i use the
enable property for this as

Form4 newForm = new Form4();
newForm.Show();
this.Enabled = false;
But how can I enable the the previous form over the new form after the job
is finished with the new form that I opened.

--
hard can be achieved!

impossible takes a little time!

RE: Enable a windows form over another one? by AndreasKnudsenATbekkno

AndreasKnudsenATbekkno
Sun Jun 05 16:57:02 CDT 2005

"panda" wrote:

> I want to disable a form after opening a new one in front of it and i use the
> enable property for this as
>
> Form4 newForm = new Form4();
> newForm.Show();
> this.Enabled = false;
> But how can I enable the the previous form over the new form after the job
> is finished with the new form that I opened.
>

one way is to include a reference in the new form to the old form. (assuming
old form is of type Form3:

public class Form4{

Form3 owner;

public Form4(Form3 caller){
owner = caller;
}


public void OnClose(yadayadayada){

owner.Enabled = true;
}


}

RE: Enable a windows form over another one? by DayaPSP

DayaPSP
Mon Jun 13 04:16:03 CDT 2005

In the current form close event or in the Exit button enable the first form
like,

private void Form4_Closed(object sender, System.EventArgs e)
{ {
Form1 oldForm = new Form1();
oldForm.Enabled=true;
oldForm.Show();
}

Cheers, Daya
"panda" wrote:

> I want to disable a form after opening a new one in front of it and i use the
> enable property for this as
>
> Form4 newForm = new Form4();
> newForm.Show();
> this.Enabled = false;
> But how can I enable the the previous form over the new form after the job
> is finished with the new form that I opened.
>
> --
> hard can be achieved!
>
> impossible takes a little time!