6.01 bug?

robmh

Member
Licensed User
Hi

An "old" program ran fine
1. on the device (compiled under 5.xx),
2. on the device run from B4PPC 6.01 and
3. on the desktop under 6.01

I then compiled it under 6.01 and copied it to the device.

Here it ran OK but all dimensions except for text seemed to be halved i.e. all buttons were half height/width and the forms only occupied a quarter of the screen.

Note that I have a VGA device.

Is this a bug or am I doing something wrong?

Thanks in advance for any help.
 

Put Claude

Active Member
Licensed User
Hi Erel,

I have this also, on the Acer n300 WM5 640x480 resolution: do not now what to do with it...

Put Claude Belgium

P
 

Erel

Administrator
Staff member
Licensed User
.Net CF 2.0 applications (like the optimized executables) do not use the pixel doubling method.
Which means that you can now take advantage of the high resolution screen.
You have two options. You can change the Visual Designer screen size to 640 * 480 and create a VGA version.
Or you can use the nonoptimized compiler and create a .Net 1.0 application.
 

robmh

Member
Licensed User
More questions ...

OK thanks.

This creates a problem though.

When developing on the device "pixel doubling" takes place when the program is Run from within B4P i.e. if a I develop on the device then compile on the desktop the program will behave differently.

Also, can you offer advice on how do to develop the program to support non-VGA and VGA devices. Would I have two sbp files which just contain just user interface code and have a shared txt file with the rest of the code?

BTW, I need to use .NET 2 as I'm using SQL.
 

Erel

Administrator
Staff member
Licensed User
Nonoptimized executables will use pixel doubling whether running under .Net CF 2.0 (with the config file) or under .Net CF 1.0.
So it is possible to use SQL with a nonoptimized executable.

If you do want to deal with the different resolutions then check Form.Width / Form.Height properties at runtime and change the layout if necessary.
 

uskomp

Member
Licensed User
scaling of controls

Hi
A small procedure for resizing all controls (it isn't the best solution but ...)

' from QVGA to VGA
SkalujForm("Form1", 2)
SkalujForm("Form2", 2)
..................


Sub SkalujForm(sform,i)
mycontrols()=GetControls(sform)
For n=0 To ArrayLen(mycontrols())-1
Control(mycontrols(n)).Top=Control(mycontrols(n)).Top*i
Control(mycontrols(n)).Left=Control(mycontrols(n)).Left*i
Control(mycontrols(n)).Height=Control(mycontrols(n)).Height*i
Control(mycontrols(n)).Width=Control(mycontrols(n)).Width*i
If ControlType(mycontrols(n))="Image" Then
Else
Control(mycontrols(n)).FontSize=Control(mycontrols(n)).FontSize*i
End If
Next
Control(sform).Refresh
End Sub
 

kyto

Member
Licensed User
Example?

Hi uskomp.
Thanks for this idea.
Can you post a (little) example (source code) please?
Newbies (as me) will be appreciating.
Thanks!
 
Top