Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last Position
Message
 
À
18/10/2000 06:08:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00430783
Message ID:
00430800
Vues:
13
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform