Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last Position
Message
 
To
18/10/2000 06:08:43
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00430783
Message ID:
00430800
Views:
12
Aston,

Visual FoxPro cannot remember it, but you can write code that does. Create a table with the following structure;
FormPos.dbf

Field
FormName    C (20)
Left        I
Top         I
Then in the Init of your form class put this code:
* Form class Init
LOCAL lcAlias
lcAlias = ALIAS()
IF NOT USED("FormPos")
   SELECT 0
   USE FormPos AGAIN ALIAS FormPos
ELSE
   SELECT FormPos
ENDIF
LOCATE FOR FormName = This.Name
IF FOUND()
   This.Left = FormPos.Left
   This.Top = FormPos.Top
ELSE
   APPEND BLANK
   REPLACE FormName WITH This.Name
ENDIF
IF NOT EMPTY( lcAlias )
   SELECT ( lcAlias )
ELSE
   SELECT 0
ENDIF
and in the Destroy of the form class put this code;
LOCAL lcAlias
lcAlias = ALIAS()
IF NOT USED("FormPos")
   SELECT 0
   USE FormPos AGAIN ALIAS FormPos
ELSE
   SELECT FormPos
ENDIF
LOCATE FOR FormName = This.Name
REPLACE Left WITH This.Left, ;
        Top WITH This.Top
IF NOT EMPTY( lcAlias )
   SELECT ( lcAlias )
ELSE
   SELECT 0
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform