Having made a pretty good start on my application, I've now been told that the bosses want all forms to be placed within a 'containing' form so that all the different screens that come and go as the user moves around the app are in the one place.
So I changed my form classes to have a ShowWindow property of 0 (in Screen), removed _screen.visible = .f. from my main.prg and all seemed fine - they all appear within the VFP screen (I put in some other code to put in a nice background graphic on the _screen and hide any menus etc.)
Except that now Read Events/Clear events seems all messed up. I have a standard call to my login form:
The big problem comes when I want to either release a form or close down the application altogether (this was working fine before). Before if I clicked the cancel button on my login form the code thisform.release would run and then my shutdown procedure would kick in. Now the loginform releases, but then I'm just stuck with my VFP window
I suppose this becuase I still have a form (the main VFP window) open, so the on shutdown event hasn't triggered. What I did find is that by taking out the READ EVENTS line I could almost get things working, but then the problem would be that releasing one form would close down the whole application! Sorry, I know the whole Read Events/Clear Events comes up a lot and I've been bombarding you guys recently, but this is really confusing me. Any help would be great. Thanks,
Tom
So I changed my form classes to have a ShowWindow property of 0 (in Screen), removed _screen.visible = .f. from my main.prg and all seemed fine - they all appear within the VFP screen (I put in some other code to put in a nice background graphic on the _screen and hide any menus etc.)
Except that now Read Events/Clear events seems all messed up. I have a standard call to my login form:
Code:
ON SHUTDOWN do ShutdownProc in .\progs\shutdn.prg
[green]*some code here to remove statusbar, disable close buttons etc.[/green]
DO FORM .\forms\MF_login
READ events
I suppose this becuase I still have a form (the main VFP window) open, so the on shutdown event hasn't triggered. What I did find is that by taking out the READ EVENTS line I could almost get things working, but then the problem would be that releasing one form would close down the whole application! Sorry, I know the whole Read Events/Clear Events comes up a lot and I've been bombarding you guys recently, but this is really confusing me. Any help would be great. Thanks,
Tom