First thanks a lot at you two for your answer
I have tried all your codes with v5.31 and W8.1 and i have this results
@NETMAESTRO
Your code have no effect on my tablet

I have put the tablet in landscape position and run the code with #ORIENTATION_PREFERENCE_PORTRAIT and nothing happened ...
The result is good 1, but nothing
In the same time i have oppened the panel of screen resolution for see if the orientation combobox have changed and no, the combobox is always on "landscape"
I have try also #ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED and it's the same result
@JHPJHP
Your Lock Rotation code have no effect too
Debug result wrote:AR_ENABLED
ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED
Like for NETMAESTRO, my tablet is putting horizontaly, i look the panel of screen resolution and the combo is always in landscape mode
Your change Orientation works perfectlly
I see my screen rotating automaticaly

The combo in panel screen resolution show "PORTRAIT"

(Obviously when the screen is in PORTRAIT, other he show "LANDSCAPE")
So i have thinking to run your lock code immediatly after, when my tablet is horizontal and the screen is vertical (portrait), for see if i can lock the mode on portrait, but the combo screen resolution panel always say "PORTRAIT" but if i turn my tablet, the mode is not locked, the screen return automaticaly to Landscape mode
Furthermore, i have a strange behaviour, if i touch the desktop, or the Panel screen resolution, the screen automaticaly return to landscape mode, and the combo screen resolution show "LANDSCAPE"
Again thanks to have spent one hour for help me
I have really to much chance to know the members of this forum, never i have see so much generosity
@Friends
Thanks again at you two
