How can I know in a C#-Application, in which direction the screen of the mobile device is orientated? (i.e. horizontal or vertical).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Microsoft.WindowsMobile.Status there is a class which keeps track of all kinds of properties of your device. Besides the one you need, DisplayRotation, it also contains properties about phone coverage, Nr of missed calls, next appointment and many more. See msdn for more info.
You can also add an event-handler to be notified of changes of these properties.