Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get windows to save positions in APP
Message
From
20/08/1999 13:03:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00255821
Message ID:
00255936
Views:
15
>OK, I'm hitting a wall here, and I don't know how to get around it...even though it seems that everyone else knows how to scale it!!!
>
>HOW THE !@## DO YOU GET YOUR APP TO SAVE THE POSITION AND SIZE WHEN THE USER EXITS THE PROGRAM?!?!?!
>
>I've got RESOURCE ON in my prog that calls my forms and stuff, my foxuser.dbf is in the proper place...HOW DO I USE IT??? Am I totally missing something here? ARGH!
>
>So to recap from my rantings: I need to have my apps remember the state in which they were exited (window state, position, etc.)...for some reason I thought that this was implicite by setting RESOURCE ON, but I guess not. Any help would be appreciated:) (happy friday:))

You should use the registry to store this information. My framework does this by just setting a form property: Form.RememberPosition to .T.. It is done by instanciating a registry access object (I use Rick Strahl's) and just writing the keys on form.Destroy. And then the next tim the form starts, check for the existence of the keys in the form.load and reset the position. It will take some time to get it set up, but after you do it once, you never have to do it again.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform