>>>>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