Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Center Form on Rotation
Message
From
19/01/2017 11:02:07
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646851
Message ID:
01646860
Views:
41
>>>First, thank you for the code.
>>>Do I understand correctly that this code has to be at the Top of the application and will apply to every form?
>>>I thought I would need to add the "centering" code in every form.
>>>Could you, please, clarify?
>>
>>This is just a demonstrator. A real-world implementation will depend on how is your application displaying its forms. Do you work on the VFP screen, or do you have one or more Top-Forms?
>
>My app uses VFP screen and then each form is opened from a toolbar at top of the application. So I will try to "convert" your code into using it in each form separately. The entire application has less than 10 forms.
>Again, thank you.

But then, Dmitry, don't you need to center the VFP screen, first? If you center a child form inside the main VFP window, it centers against the VFP _Screen window, not against your device screen. Unless, of course, your VFP main form is running maximized.

Anyway, a stabilized version of this code would fit in a subclass, instead of replicating it in every form of your project (if you're not using subclasses, and instantiating VFP base classes instead, perhaps you could consider refactoring your project - but that is a different story).
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform