Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't make forms go away
Message
From
04/05/1998 12:12:26
 
 
To
04/05/1998 11:54:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00096713
Message ID:
00096745
Views:
14
>>>   It seems the harder I work the dumber I get. As a newbie to vfp, I'm having a dickens of a time getting the hang of visual/oop.
>>>   I've created a couple of forms, starting with a LOGIN. When the user clicks on the OK button, the click event does a
THISFORM.RELEASE()
>>>DO FORM REPORTS
>>>The REPORTS form comes up all right but the LOGIN form is still there hiding underneath. Calling another form puts that one on top of this one.
>>>   I seem to have missed something very basic here. Is this normal behavior of forms, or as is more likely, am I exhibiting my ignorance again. I can find all kinds of info for opening forms, but almost nothing on closing them. Could someone please help?
>>>TIA
>>>Pete
>>
>>Try 'RELEASE Thisform'
>
>Ed,
>    I've tried every variation of 'RELEASE Thisform' I could find; no soap.
>    It think that Josh has me on the right track. The books say that I need a return from from a 'DO', which I have now tried. It now looks as though I have a problem with the 'READ EVENTS' line in my 'Main' prg. Wherever I put it, everything seems to stop and leave me with a blank screen. Depending on where I put the 'READ EVENTS' is where everything stops. I feel like such an idiot with this stuff, having to ask for help when the answers are in the books. I just can't seem to glean the meaning out of them. my "Main.prg' looks like this:
>
>DO Setup.PRG     && Setup the environment
>READ EVENTS     && Establish Event Loop
>DO FORM Login     && Establish User's Environment
>DO FORM TmpPick    && Select Repots, Modify db, Exit
>clear events
>DO Cleanup.PRG     && Restore the environment
>QUIT
>
>    Have I done some really dumb again?

Normal structure is following:
*** Main.prg
*some setting here
DO FORM Login to lLoginflag
if lLoginflag
* some cleaning here
return
endif
DO FORM Mainform && this is main form/formset. Quit code should contain CLEAR EVENTS
READ EVENTS
* some cleaning here
RETURN
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform