Welcome! Log In Create A New Profile

Advanced

Detect Windows Tablet orientation change

Posted by Paul 
Paul
Detect Windows Tablet orientation change
October 28, 2018 05:09AM
Hi all

I'm wanting to detect any orientation change on windows tablets (landscape to portrait etc) so that the windows can change layout. I believe the event I should be listening for is 'orientationchange', however this isn't in the sypplied windows constants file. I've searched but haven't found the numeric value of that constant. Does anyone know it? Note I'm doing this manually because I can't find any automated function for it in WD23.

Rgds
Paul
Christoph Erdmann
Re: Detect Windows Tablet orientation change
October 29, 2018 09:16AM
Hallo Paul,

you can use "Resize WINDOW". You find this in the Window-Code. Then you compare the Height and the width fom the Window. Sorry, I have no example code.

Christoph
Paul
Re: Detect Windows Tablet orientation change
October 29, 2018 12:10PM
Hi Christoph

Unfortunately that event doesn't fire when changing screen orientation, as the window doesn't automatically resize.

More suggestions are definitely welcome as I still haven't solved this problem!

Rgds
Paul
Peter Holemans
Re: Detect Windows Tablet orientation change
October 29, 2018 01:12PM
Hi Paul,

What's your configuration?
If it is UWP (Universal Windows 10 Platform) I think it should work out of the box.
[doc.windev.com]

Cheers,

Peter Holemans
Paul
Re: Detect Windows Tablet orientation change
October 30, 2018 12:18AM
Hi Peter

Testing on a Dell Win10 laptop / tablet. My WD23 app doesn't detect orientation change, although WD23 (and other programs) do.

Rgds
Paul
Paul
Re: Detect Windows Tablet orientation change
October 30, 2018 07:50AM
Forgot to say this is a standard desktop app.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: