![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
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 |
|
|||
|
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. |
|
|||
|
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 |
|
||||
|
You can try this library: ControlsExDevice library
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |