General information
Category:
Forms & Form designer
>i am maintaining someone else's application and i have run into an unusual stumbling block : i cannot get a form to display.
>
>When i use createobject to make a form appear and then issue show the form releases from memory.
>
>When i use DO FORM and trace the firing of events in the form the event sequence goes something like
>
>LOAD , INIT , .... UNLOAD
>
>i used messageboxes to observe this behaviour.
>
>
>Regarding the forms in the app that do work properly ...
>when i trace them using SET STEP ON just before a DO FORM is issued.
>I trace through the form ... and guess what ... the form never does appear on the display.
>
>When i do not trace the "original" forms they appear fine.
>
>i have checked the visible property it is set to true.
>It seems that when the "Show" event fires .. the UNLOAD or RELEASE event fires next.
>
>any help is appreciated
Well, what may be happening is, if you are using createobject, probably the variable that holds the object is going out of scope, in other words dissapearing.
if you try something like this, it may give you a hint on what is going on:
loMyform = CREATEOBJECT("FORM")
loMyform.Show()
If this code is in a program, the form will show but will dissapear right awai because the property loMyform will be gone as soon as the programs is done.
if you include PUBLIC loMyform before creating the form, that form won't go away.
Hope this helps.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only