Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


screen resolution 320x320


Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 07-23-2008, 09:37 AM
Newbie
 
Join Date: Nov 2007
Posts: 8
Default

I have looked through the threads and I cannot find how to simply get a value of x and y to represent the device's physical screen size. I need to do such as this:

x = devicescreen.width
y = devicescreen.height

I need (as others have also mentioned) these x and y values (which will change from device to device) to allow me to place objects at calculated places on the screen, always taking into account the various screen sizes and always using the same program - not having to recompile for device to device.

I have read that the 'Forms are always maximized to the physical screen size.' but when I compiled a program (on the PC) set for 320 x 240 and then placed this application on to my i780 (which is 320 x 320), the value of the i780's form.height and form.width returned the original compiled screen size and not the new value of the i780 (and vice versa occurs).

However, if I do not compile the application on the PC and run the program via Basic4ppc directly on my i780, the form.height/width is being returned correctly.

So the form.height/width only appears to be returned correctly for device to device when running a non-compiled program via Basic4ppc.

Since everyone else seems to be able to get various device's physical screen size (using the same application and not having to compile for each device) I must be missing something for which I apologize.

I hope that someone can assist me.

Last edited by SteveA : 07-23-2008 at 10:31 AM. Reason: typo
Reply With Quote
  #12 (permalink)  
Old 07-23-2008, 05:33 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

The values returned from Form.Width / Form.Height (on the device) are not related to the screen size set in the visual designer.
The screen size settings only affect desktop applications.
Reply With Quote
  #13 (permalink)  
Old 07-23-2008, 11:32 PM
Newbie
 
Join Date: Nov 2007
Posts: 8
Default

Oops, I seem to be stuck in a loop.

When I run my compiled and optimised application on a TyTn it returns the form width/height as per the TyTn (which is no surprise as the form was originally set up as per that size).

When I put the same compiled application on my i780 it is not returning the correct form size for the i780. In fact, the form is only being drawn small as per the original TyTn size. Because I am not detecting a larger screen size I am not able to do different placements of items to match the available space.

However, when I put the uncompiled program on the i780 and run it using the run command from Basic4ppc then it does exactly as you say - it automatically resizes the form to match the i780 screen and returns the correct larger size, which I can then use to scale placements of items.

What I am trying to do is get the above correct returning of screen size but when running a final optimised compiled program.

Since you have repeated that this should be case I must be doing something wrong.

Does anyone have an example of a 2 liner compiled program which will simply display the device's screen size in a message box. I could then run it on a TyTn and then on my i780 to check it returns the correct values and my setup.

Apologies again, but as I said, I seem to going round in circles as I am not getting the results you say I should.

Thanks

Last edited by SteveA : 07-23-2008 at 11:36 PM.
Reply With Quote
  #14 (permalink)  
Old 07-24-2008, 07:16 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Please try to compile your application in Forced QVGA mode.
This mode also uses the optimized compiler.
Reply With Quote
  #15 (permalink)  
Old 07-24-2008, 08:46 AM
Newbie
 
Join Date: Nov 2007
Posts: 8
Default

Thanks - nearly there. I have compiled using forced VGA and when I run the new compiled program on the i780 the main form has auto expanded to fill the width of the screen (but is too high/long).

However it is still returning 240 x 188 as the co-ordinates (the same size as designed on the PC and the same results as before), which is not the actual hardware size of the new i780 device.

Are there any hardware registers which can be read to indicate a device's screen size rather than reading a form's size, which, at the moment, seems to be giving me an error.

Thanks for looking at this, Steve
Reply With Quote
  #16 (permalink)  
Old 07-24-2008, 11:00 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You can try this library: ControlsExDevice library
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check the screen resolution Ricky D Questions & Help Needed 5 11-04-2008 07:02 AM
Has anyone got a 320x320 screen they can test my app on please? badkarma Questions & Help Needed 1 06-18-2008 09:55 AM
FS loox 720 no VGA resolution available BerndB Questions & Help Needed 5 04-06-2008 12:22 PM
Different screen sizes Gex Questions & Help Needed 4 01-23-2008 11:46 AM
display resolution VGA 480*640 BerndB Basic4ppc Wishlist 7 07-03-2007 03:29 PM


All times are GMT. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0