Board index » delphi » Close TForms without shutting down the MAIN Form

Close TForms without shutting down the MAIN Form

as per subject

is there any way to shutdown all the forms and dialogs i ShowModal
without closing my main (1st) form.  all forms/dialogs are normal
not the mdiform/mdichild.

thanx
any inputs are appreciated!

 

Re:Close TForms without shutting down the MAIN Form


 Count := 0;
     For i := 0 to Screen.FormCount-1 do
       if Not (Screen.Forms[I].handle = Application.mainform.Handle)
then             If Screen.Forms[I].CLoseQuery then
Screen.Forms[I].Release;

Hope this helps

--

Thanks

    Fred Schetterer [FreDsterWare]

    FreDsterW...@bctel.ca

    Web Site, Software and Support at:
    http://user.aol.com/fredstware/index.html

Other Threads