Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hide and Show
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00121321
Message ID:
00121371
Views:
14
>I seem to be having difficulty in moving back to a previous form when useing {thisform.hide do form y } in a click prompt button ( which moves fine into form y, but when i issue a unload statement ... {thisform.release show.x} i get an error (Object x is not found)... debug shows

Another approach would be to pass a reference to form x to the init of form y. Keep the reference to form x in a property on form y and then in the destroy of form y, use the reference to set focus to the previous, then null out the reference on form y so that form y can release properly

FirstForm.cmdGoSecondForm.Click()
=CREATEOBJECT("SecondForm",thisform)

SecondForm.Init()
LPARAMETERS toFirstForm
toFirstForm.Hide()
this.oFirstForm = toFirstForm


.....

PROC SecondForm.cmdOk.Click()

LOCAL loFirstForm
loFirstForm = thisform.oFirstForm

thisform.oFirstForm = .NULL.
loFirstForm.Show()
thisform.Release()

If the Show doesnt work, try:

ACTIVATE WINDOW (loFirstForm.Name)
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Previous
Reply
Map
View

Click here to load this message in the networking platform