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

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

Code Samples & Tips Share your recent discoveries and ideas with other users.

Change screen orientation programmatically??

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-07-2007, 08:34 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Put Claude View Post
Hi,
I upload again the orientation programs, you have to use them with the
shell function:
If isppc = True Then Shell("Lndsc270.exe", "")

Put Claude Belgium
And, as usual for my device, the 'orientation programs' don't work.
I am programming on the device.

Code:
Sub Globals
    
'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
End Sub


Sub Button1_Click
if isppc = true then Shell("Lndsc270.exe""")

End Sub
If 'isppc' is invalid, you mean cPPC. Which still doesn't work on my device.
I will post more tomorrow after work.
I get the time to program the device at work
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #12 (permalink)  
Old 10-09-2007, 03:40 PM
Knows the basics
 
Join Date: May 2007
Posts: 95
Default

hi taxmania,

Sorry if not understandable, this is a piece from the code, an I did not mentioning the variable 'isppc'...
Sub global

isppc=0

End Sub

Sub App_Start 'POINT to start

isppc = CPPC 'returns False or True=PPC, check if running on desktop or PPC
If isppc = True Then Shell("Lndsc270.exe", "")

work with variable, so I have not togo trough the cPPC function all the time...
Works with me on 4 different Pockets WM3 SE, WM 5, WM6 Pro....
Good luc....

Put Claude Belgium

Last edited by Put Claude : 10-09-2007 at 03:48 PM. Reason: forgot something
Reply With Quote
  #13 (permalink)  
Old 01-08-2010, 12:05 AM
Junior Member
 
Join Date: Nov 2009
Posts: 16
Default

How do I detect change in screen orientation and have my form switch/adjust? I have an application that when the user slides out the keyboard and the screen rotates, the buttons do not rotate with the rest of the controls (labels and text boxes), and they (the buttons) cease to function. Thanks in advance. Please provide as much detail as possible because I am quite the newbie.
Reply With Quote
  #14 (permalink)  
Old 01-08-2010, 09:27 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

If you are using WM5.0 or later then you could try using my http://www.basic4ppc.com/forum/addit...5-0-later.html to see if you can get a StateChanged event when the system DisplayRotation state changes. I've just noticed that there is a typo in the help . The second description titled GetState that returns a reference should be titled GetValue.

Also the Device object in my http://www.basic4ppc.com/forum/addit...html#post10811 lets you get and set the display rotation.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #15 (permalink)  
Old 01-08-2010, 10:26 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Berkshire, UK
Posts: 762
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by agraham View Post
Also the Device object in my http://www.basic4ppc.com/forum/addit...html#post10811 lets you get and set the display rotation.
I think that Andrew meant the "Display" object (I can't find a Device object).

If you (anyone!) is using Basic4ppc - Windows Mobile programming and Pocket PC Development to get quick access to the documentation of library functions, note that it is well out of date. For instance the ControlsExDevice is shown there as having seven embedded objects whereas I count fifteen in version 1.8. The details are also correspondingly out of date too.

Mike.
Reply With Quote
  #16 (permalink)  
Old 01-08-2010, 10:36 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Thanks Mike. I did mean Display, this old memory is getting worse I should have checked!
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #17 (permalink)  
Old 01-08-2010, 11:07 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Borchen, Germany
Posts: 434
Send a message via ICQ to corwin42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by SonicSue View Post
How do I detect change in screen orientation and have my form switch/adjust?
The easiest way to detect a screen rotation is the Resize event of the formlib.
See formlib helpfile for a small example.

There are several ways for adjusting the controls to screen resolution changes. I'm currently writing a small tutorial for adjusting applications for several screen resolutions. I hope to post it in a few days.

Greetings
__________________
Markus
Reply With Quote
  #18 (permalink)  
Old 01-09-2010, 01:49 AM
Junior Member
 
Join Date: Nov 2009
Posts: 16
Default

I will definitely be looking forward to your tutorial, since what I have is not working...
Reply With Quote
  #19 (permalink)  
Old 01-09-2010, 05:21 AM
Junior Member
 
Join Date: Nov 2009
Posts: 16
Default

Quote:
Originally Posted by agraham View Post
If you are using WM5.0 or later then you could try using my http://www.basic4ppc.com/forum/addit...5-0-later.html to see if you can get a StateChanged event when the system DisplayRotation state changes. I've just noticed that there is a typo in the help . The second description titled GetState that returns a reference should be titled GetValue.
The help file opens but all I get is the menu and no details...
Reply With Quote
  #20 (permalink)  
Old 01-09-2010, 09:35 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It's a security "feature" because it's a downloaded file. Right click on the file name, select Properties and there's a checkbox to unblock it somewhere.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
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
can i change font ? gjoisa Questions (Windows Mobile) 1 03-29-2008 10:58 AM
Font change klaus Questions (Windows Mobile) 6 12-30-2007 07:00 PM
sceen orientation Filec Questions (Windows Mobile) 3 07-13-2007 01:34 PM
Image gets lost with orientation change HARRY Questions (Windows Mobile) 7 05-14-2007 10:19 AM
Screen orientation changes automatically? mwaite Questions (Windows Mobile) 3 05-01-2007 07:53 PM


All times are GMT. The time now is 05:06 AM.


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