Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Center Form on Rotation
Message
From
19/01/2017 15:46:38
 
 
To
19/01/2017 14:28:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646851
Message ID:
01646873
Views:
35
>>>>Sorry for a very newbie question. Does you code:
>>>>
>>>>BINDEVENT(_Screen, "DisplayOrientation", This, "ReCenter")
>>>>
>>>>mean that every time the value of the VFP main window (_screen) DisplayOrientation changes, call ReCenter method?
>>>
>>>Yes.
>>
>>Thank you.
>
>Dmitry, just checked on my Windows 10 tablet: the recentering is working ok after the screen rotation (there is a minor glitch in the test, the form release should be put before the #ENDIF, but this is irrelevant to what you need).

Antonio,
Again, thank you so much for your help. Your approach in centering a form on rotation works.

Although now that I see it works, I will have to change the approach. I think instead of centering a form, I will center it - width-wise - but will "anchor" to the top toolbar. The tablets' keyboard is always on the bottom and if I center the form, sometimes the keyboard covers the textbox. So it is better to move the form up, to give the keyboard more room. I think your code will work still very well but I will have to calculate the width and height of the window and move it accordingly.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform