Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

monitor screen orientation

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2009, 08:06 AM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default monitor screen orientation

I know there are libraries for setting screen orentation, but what about watching for screen rotation? The only work around I could think of is using a tmer tick to cross refrence a previous value. example:
Sub app start
screen.width = a
end sub

Sub timer1_tick
if screenwidth=a then
else
resize controls
screenwidth=a
end sub

obviously not a word for word working example, just an explaned concept. This way seems waaayyyy to memory intensive though. Is there a library or a way to hook the screen rotation event from the door library? I have searched with no avail and yet i'm pretty sure its possible.
Reply With Quote
  #2 (permalink)  
Old 06-04-2009, 08:42 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

If you have WM 5.0 or later then you should be able to monitor the DisplayRotation SystemProperty and be notified if it changes with my http://www.basic4ppc.com/forum/addit...5-0-later.html
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 06-04-2009, 10:10 AM
Basic4ppc Expert
 
Join Date: Jul 2008
Location: Borchen, Germany
Posts: 571
Send a message via Skype™ to corwin42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi!

I normally use the resize event from the formlib to monitor screen orientation changes. If you have multiple forms you have to create a new formlib object for every form but it works well in my applications.

Greetings,
Markus
Reply With Quote
  #4 (permalink)  
Old 06-06-2009, 05:00 PM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks guys, i went with the flib example for now since i was already using that library for some text alignment. You guys can check out the project i'm working here if you like:
[APP][UPDATE June 3] "OpnMarket" Freeware Market/ AppStore [Beta Testing Now] - xda-developers
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change screen orientation programmatically?? HARRY Code Samples & Tips 24 05-11-2010 06:56 PM
Screen Orientation Library Pachuquin Additional Libraries 7 07-15-2009 06:04 PM
Form Orientation Shrek_Old Russian Forum 0 01-05-2009 11:27 AM
Sun Monitor alfcen Share Your Creations 16 10-26-2007 09:43 AM
Screen orientation changes automatically? mwaite Questions (Windows Mobile) 3 05-01-2007 06:53 PM


All times are GMT. The time now is 04:28 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0