How you re-open a form that you have closed is no different from how you open the form in the first place. If you used DO FORM or CREATEBOJECT() to open the form, use exactly the same code to open it again.
But, maybe you mean something else. Do you mean that you want re-open it with all its contents exactly as it was when it was closed - including any data that the user has entered? If so, don't close it and re-open it, but simply make if invisible, and then make it visible again. You do that by setting the form's Visible property to .F. amd .T. respectively.
But I'm just guessing what you want to do. If the above doesn't answer your question, please clarify what you are trying to achieve.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
If you want to be able to reopen that form with all the data in it and it's state, then you can't do that after you exited the form via form.release().
What you can do is form.Hide() to hide a form and then form.Show() to re-open it. What you need to call form.Show() of course is a variable holding a form reference.
In the first place you can do the following:
Code:
PUBLIC formvariable
DO FORM yourform NAME formvariable
Then later you can do thisform.Hide() within the form and then to reshow
Code:
formvariable.Show()
* OR
formvariable.visible = .T.
Using a PULBIC variable is just for ease of the sample code. You should avoid scattering your code with public variable names for each form, a nice thisg to do is adding a Collection class object to _screen and adding form references there.
Are you still here? You've had two replies to your question. It would be helpful to know if the replies were of any use to you, or if you still have a problem.
(The same applies to your other questions, on the LOCATE command and calling an event from another form.)
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.