Form switch

  • Thread starter Thread starter Elmar Jacobs
  • Start date Start date
E

Elmar Jacobs

hi folk,

I try to make a switch between different smart device forms.
The first form i open with
_form= new CSimpleFinderForm();

Application.Run(_form);

it works. But then I try to delete the first form und try to open a secound
one.

_form.Close();

_form = new CFinderForm();

Application.Run(_form);



But it did not work. Can anybody help me?

Thanks a lot,

elmar
 
You only need to run a form once. From there you can just use

SecondForm frm = new SecondForm();
frm.ShowDialog();// or .Show()

from the first form. In general, this is all you do to show a form.

Elmar Jacobs said:
hi folk,

I try to make a switch between different smart device forms.
The first form i open with
_form= new CSimpleFinderForm();

Application.Run(_form);

it works. But then I try to delete the first form und try to open a secound
one.

_form.Close();

_form = new CFinderForm();

Application.Run(_form);



But it did not work. Can anybody help me?

Thanks a lot,

elmar

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
http://www.devbuzz.com/content/zinc_personal_media_center_pg1.asp
 
Yes ok, but the problem is that i want to give free the memory of the unused
form.
 
Back
Top