Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto Centering of Container on Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01622935
Message ID:
01622940
Vues:
50
>>>Hi Gang!
>>>
>>>Thanks for your help on previous problems!
>>>
>>>Today, I have this one.....
>>>
>>>I have a FoxPro form that is popped up on the screen when a certain amount of inactivity occurs.
>>>
>>>It pops up MAXIMIZED now with the WindowState property set to Maximized.
>>>
>>>I set it to that to HIDE what is behind the form so any user passing by could not see HIPPA data displayed on the screen.
>>>
>>>There is also a container on the form which has input textboxes for the user to type in the login name and password to get rid of the form and resume work.
>>>
>>>The container stays near the left and top of the form, no matter the size of the form ( some have 800 by 600 and some have all the way up to 1920 by 1080).
>>>
>>>I'd like for the container ( name is cntLocked ) on the form to stay CENTERED top to bottom and left to right, no matter the screen size.
>>>
>>>I tried adding this to the forms RESIZE event, but it had no effect....
>>>
>>>
>>>Thisform.cntLocked.Left = INT((Thisform.Width 	- Thisform.cntLocked.Width) /2)
>>>Thisform.cntLocked.Top  = INT((Thisform.Height   - Thisform.cntLocked.Height) /2)
>>>Thisform.Refresh
>>>
>>>
>>>Any ideas?
>>>
>>>Will I have to do a BindEvent ?
>>>
>>>Thanks!
>>
>>OOPs,
>>After I posted my answer I saw that I'm not right.
>>
>>What is wrong with that code?
>>It works fine in my form resize event.
>>
>>Maybe Anchor is set for the container?
>
>I rechecked the Anchor... it is set to 0 for the container.
>
>I will keep checking.
>
>Maybe I need to call the Resize Event form the Init of the form ?

No, just center the container in Development mode.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform