screen resolution 320x320

moster67

Expert
Licensed User
Longtime User
Hello - I am new to this forum and I take the occasion to greet you all.

I just got myself a Samsung i780 which is particular since it's using a square resolution, namely 320x320. Being myself a programmer but with no experience in the field of handhelds, smartphones ecc, I decided I'd like try to make a small proggy to execute on my Samsung. I am here because I am looking for development-tools and Basic4PPC seems like a good start.

As mentioned, the Samsung i780 has a screen-resolution of 320x320 which makes it particular (I think there's also a Treo out there with this resolution). I am just wondering if Basic4PPC supports this resolution natively (just like Windows Mobile 6 (pls see: What's New for Developers in Windows Mobile 6) or will I run into problems??

Hope to hear from you.

Rgds,
Moster67
 

willisgt

Active Member
Licensed User
I've written programs in a variety of resolutions without problems (excepting for VGA devices, which Basic4PPC v.6.3 resolved).

I doubt you'll have problems from a 320x320 device.


Gary
 

balcib

New Member
Licensed User
I bought the same device. Since then, I can not use my old programs as they are all resized in Samsung i780. Is there a way to prevent resizing of the forms in device?

Thanks
Bulent
 

moster67

Expert
Licensed User
Longtime User
Thank you for your inputs.

In order to develop a proggy that can run under different screen-resolutions, how would you proceed?

I would do something as follows (if what I am describing is available in Basic4PPC):

1) Through some function/library, (hopefully already included in Basic4PPC), try to obtain hardware-information which includes screen-resolution.
2) Then I would load the correct skin and buttons by using pre-programmed skins and buttons for that resoltion in use. However perhaps this can be avoided if one could dynamically adjust the skin and buttons at the time of booting up the proggy and if Basic4PPS now supports this (I would do this during the event "form.load" or whatever it is called in Basic4PPC).

Does this make sense?

Rgds,
moster67

Forms are always maximized to the physical screen size.
One exception is VGA devices where you can choose if you want to use high resolution or low resolution.
 

moster67

Expert
Licensed User
Longtime User

RCC2k7

Member
Licensed User
I used to work with an iPAQ 6515 and then a Treo 750, both of which used a square resolution of 240x240 and both the Basic4ppc IDE and the programs developed ran fine on both devices.

The problem with 320x320 is that it is not a normal WM resolution - it is only supported natively on WM6. It requires some tricky icon resizing and stuff like that as I was reading on the Windows Mobile Team Blog so I wouldn't be surprised if existing B4PPC programs do not display properly. I think your best bet is to start developing on the device itself so you can at least rearrange the UI on your program to display decently.
 

moster67

Expert
Licensed User
Longtime User
Many thanks for your advice.

For the time being I am trying to get to grips with the new interface of Basic4PPC and the variations of its BASIC-language. So for the time being I am only developping in the desktop-enviroment but I will keep in mind you advice as to verify the UI directly on the i780.

Rgds,
moster67

I used to work with an iPAQ 6515 and then a Treo 750, both of which used a square resolution of 240x240 and both the Basic4ppc IDE and the programs developed ran fine on both devices.

The problem with 320x320 is that it is not a normal WM resolution - it is only supported natively on WM6. It requires some tricky icon resizing and stuff like that as I was reading on the Windows Mobile Team Blog so I wouldn't be surprised if existing B4PPC programs do not display properly. I think your best bet is to start developing on the device itself so you can at least rearrange the UI on your program to display decently.
 

SteveA

Member
Licensed User
:sign0013: 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:

SteveA

Member
Licensed User
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:

SteveA

Member
Licensed User
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
 
Top