Working with screen resolutions

Nycran

Member
Licensed User
Longtime User
:sign0104:

Hi all, just wondering if some experienced PPC developers can shed some light on screen resolutions?

I have a Dell AXIM X51v, and the first app I compiled and tested appeared in a very small section of the screen. So, I adjusted the screen size to 480 x 640, and it looked much better. However, this has some other problems:

A) The SIP line is no longer accurate, as the SIP comes up over the top of the bottom of the screen.

B) Does this mean I have to create multiple versions of the app, so I can support different screen resolutions?

Any advice would be gratefully received.

Cheers,
Andrew.
 

Nycran

Member
Licensed User
Longtime User
Thanks for your help Erel.

It's really strange though as I'm definitely seeing the IDE setting impact the device screen size. For example, if I change the screen size in the IDE back to 240 x 320 by selecting Tools --> Screensize (from the designer window), and then if I recompile the app for Device.exe, the controls appear very small. Moreover, the default screen size is appearing really tiny on the Axim.

I don't know if the way I'm installing it is making a difference... because I'm using Vista (no activesync), I'm copying across the ARMV4 Cab file directly to the device and then running it on the device - this installs the application.

Any thoughts?
 

Nycran

Member
Licensed User
Longtime User
I'm using the IDE only on the desktop at the moment. I compile on the desktop, and then copy the CAB to the PPC using the Windows file explorer. Should I be trying the IDE on the PPC device?
 

Nycran

Member
Licensed User
Longtime User
Actually, that in itself is a problem. When I run the setup program to install the device IDE, it fails because ActiveSync is not installed (I can't install ActiveSync on Vista I don't think). Is there a CAB download for the IDE? Should I be using Basic4PPC on a non-vista PC?
 
Last edited:

Nycran

Member
Licensed User
Longtime User
Thanks for that guys. I installed the Windows Mobile Center 6 software and now I can install programs onto the device.

:sign0060:

Ok, moving on. The IDE on the device works fine, and if I write a new test application on the device then the form appears as you would expect. I dragged a button and a list box onto a new form, and checked the width of the listbox which was about 200px.

So, it seems my problem only occurs when I make an application via the desktop IDE.

To confirm the issue, I made a brand new application using the desktop that simply had a button and a listbox. I've attached a couple of screenshots to this post.

Designer.jpg is the design of the form on the desktop. form_on_axim.jpg is a screen shot taken on the device itself.. you can see how the controls are almost half the size they should be.

Hope that helps.
Thanks!
Andrew.
 

Attachments

  • designer.jpg
    designer.jpg
    33.7 KB · Views: 376
  • form_on_axim.jpg
    form_on_axim.jpg
    5.7 KB · Views: 327

agraham

Expert
Licensed User
Longtime User
It looks like your Axim thinks that the compiled exes are HI_RES_AWARE. - note the large button text. You haven't used a hack to get normal QVGA programs to run non-pixel doubled have you?

Have you seen this thread. It doesn't help your immediate problem but it might be of interest once you have.

http://www.b4x.com/forum/showthread.php?t=786
 

Nycran

Member
Licensed User
Longtime User
Nope, I didn't use any hacks. I just compiled normally, used CabWiz to pack the exe and SQLite dll's into an installer and then installed it on the device. Are there any config files perhaps that I need to include in the Cab? Are there any files I should look for in my application direction? Not sure how to solve this.
 

Nycran

Member
Licensed User
Longtime User
Hi Erel, don't mean to be a pain here, but just wondering if you could investigate this further, as in order to support the Axim X51v (and probably other VGA PDAs), I'm going to need to make two versions, which I'd prefer not to have to do.

I'm developing on the desktop, so having the problem go away when I compile it on the device itself isn't going to help me much.

Do you have any suggestions for what I can try to resolve this? Does anyone else here actually have an X51v?
 

Nycran

Member
Licensed User
Longtime User
Thanks Erel. If it comes down to it, I'll send you my Axim for testing and some money so you can send it back again.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Lets try a simple workaround:
B4X:
Sub Globals
    'Declare the global variables here.
    Dim controls(0)
End Sub

Sub App_Start
    Form1.Show
    If Form1.Width > 400 Then
        controls() = GetControls("Form1")
        For i = 0 To ArrayLen(controls())-1
            name = controls(i)
            Control(name).Top = 2 * Control(name).Top
            Control(name).Left = 2 * Control(name).Left
            Control(name).Width = 2 * Control(name).Width
            Control(name).Height = 2 * Control(name).Height
            Control(name).FontSize = 2 * Control(name).FontSize
        Next
    End If
End Sub
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
I haven't tested it with an Axim X51v but other VGA devices do show the screen as 240x320 (double pixels).
@RandomCoder, do you have this problem with your Axim X51v?

I've created a Form with a Button and Listbox as shown in Nycran's screenshot then transferred it using Window Explorer and it's displayed exactly as it was on the Desktop IDE.

I've had a look at the system settings of my Axim X51v and nothing seems to affect the size of the controls on the Form.
On the device I have WM5 and on my desktop I have XP Media Center.

The only problem I've ever experienced is that font size is displayed slightly larger on the desktop than on the device, but I'm pretty sure this is covered elsewhere in the forum and is to do with the Device fonts being different to the Desktop.

Regards,
RandomCoder
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
The only suggestion I can offer is that Nycran hard resets his device and then installs B4PPC and .Net Framework to see if the problem still exists.
Hopefully that should work. He will then need to re-install all his other app's (one at a time obviously) and see if the problem returns.

It's a pain, but reverting the device back to factory default should work :sign0013:

Rregards,
RandomCoder
 
Top