Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Flashing Form
Message
 
 
À
17/06/1998 08:47:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00108759
Message ID:
00109151
Vues:
27
Bill,

I just set Top, Left, Height, Width directly. Here's the code from the Init() method of the class:

cForm::Init()

* setup persistent properties for form size/position

this.AddObject( "moPersistTop",    "PersistentReg", "Top",    "", "thisform" )
this.AddObject( "moPersistLeft",   "PersistentReg", "Left",   "", "thisform" )
if ( this.BorderStyle = 3 )
   local lnHeight, lnWidth

   lnHeight = this.Height  && test to make sure saved size is not smaller than current design size
   lnWidth = this.Width

   this.AddObject( "moPersistHeight", "PersistentReg", "Height", "", "thisform" )
   this.AddObject( "moPersistWidth",  "PersistentReg", "Width",  "", "thisform" )

   this.Height = max( this.Height, lnHeight )
   this.Width = max( this.Width, lnWidth )
endif

* 12-Aug-96 make sure persistent form position is still on screen

if ( this.Top > min( sysmetric( 2 ), _screen.Height ) )
   this.top = 0
endif
if ( this.Left > min( sysmetric( 1 ), _screen.Width ) )
   this.Left = 0
endif

this.Resize()


The code inside the PersistentReg class sets the property passed in the 3rd argument to the value stored in the registry.

>Are you setting parameters directly ( e.g. MyForm.Left = ... ) or using .Move()?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform