
I have a Windows 8 tablet and i search to can choose the orientation of the screen horizontal or vertical
Furthermore, i search to prevent windows to change automaticaly this orientation
Somebody have an idea ?
Have a good day
Code: Select all
#ORIENTATION_PREFERENCE_NONE = 0
#ORIENTATION_PREFERENCE_LANDSCAPE = 1
#ORIENTATION_PREFERENCE_PORTRAIT = 2
#ORIENTATION_PREFERENCE_LANDSCAPE_FLIPPED = 4
#ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED = 8
Prototype SetDisplayAutoRotationPreferences(orientation_preference.i)
OpenLibrary(0, "user32.dll")
SetDisplayAutoRotationPreferences_.SetDisplayAutoRotationPreferences = GetFunction(0, "SetDisplayAutoRotationPreferences")
Debug SetDisplayAutoRotationPreferences_(#ORIENTATION_PREFERENCE_LANDSCAPE_FLIPPED)
CloseLibrary(0)
No sweat, your treatment of the subject is much more comprehensive than mine.Not to over-post netmaestro
Like for NETMAESTRO, my tablet is putting horizontaly, i look the panel of screen resolution and the combo is always in landscape modeDebug result wrote:AR_ENABLED
ORIENTATION_PREFERENCE_PORTRAIT_FLIPPED
Code: Select all
If OpenWindow(0, 0, 0, 220, 100, "Exemple...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget (1, 10, 60, 200, 30, "Fermer")
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1
CloseWindow(0)
End
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
hiJHPJHP wrote: Mon Feb 16, 2015 1:04 am Hi Kwai chang caine,
Not to over-post netmaestro, but I just spent the last hour writing the following scripts:
- Orientation.pb: locks the display orientation on a tablet for the current process
- Rotation.pb: rotates the display to a set orientation
See my post: Services, Stuff, and Shellhook
- Stuff/WindowStuff/DisplayStuff
Cheers!
northstarex wrote:sorry for reopening this old thread.
kcc wrote:I not have chance to love programming....
It's better for me to love washing clothes, looking flowers, making bread, etc...
The mythomaniac ! The flowers that real suffer the consequences of clogged toilets !kcc wrote:[...], looking flowers, [...]
What does the JhpJhp actually dream at night? You will be greeted with a payment request. Great website conceptKwai chang caine wrote: Tue Aug 15, 2023 3:54 pm Hello northstarex![]()
Apparently... like JhpJhp explain here
viewtopic.php?p=603676#p603676
he have replaced his site
https://www.mypurebasicstuff.com/
by a personal Forum![]()
https://www.mypurebasicstuff.com/forum/
You can perhaps found his code inside![]()
it also often happens to me not to have seen an old thread and to be happy to see it coming up after many yearsOlli wrote:I hadn't seen this topic!
Yes i know, but it's not new !!!Northstarex wrote:You will be greeted with a payment request. Great website concept