Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show form maximized problem
Message
De
21/11/2003 15:29:21
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
21/11/2003 15:11:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00852423
Message ID:
00852454
Vues:
10
I tried your suggestion but it still does not work. It's easy to reproduce:

1) Create a form and drop a container control on it named Container1.
2) Set the form's WindowState = 2
3) Add a custom method called MyResize(). Add the following code:
thisform.Container1.Left = 0
thisform.Container1.Width = thisform.Width/2
thisform.Container1.Top = 0
thisform.Container1.Height = thisform.Height/2
4) In the form's Init() and Resize() events, put:
thisform.MyResize()
When the form runs, the container is found at the 0,0 coordinates as expected, however, it's size is the same as in design mode. Now if you make the form it's normal size then maximize it again, everything is ok. If you resize the form, everthing is ok. It only fails when it first shows. Go figure...


Mike


>Hi Mike,
>
>It sounds like when you start the form initially maximized the form Resize event doesn't fire because the form isn't truly resizing.
>
>Try changing the window state in Init() or put the code in a custom method and call that method from the Init and Resize events.
>
>Jason
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform