Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Tutorials
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Tutorials Basic4ppc tutorials

Working with VGA screens

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 11-15-2008, 07:35 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You shouldn't use the Forced QVGA mode.
On the desktop you can change the screen size. Open a form and choose Tools - Screen Size.
__________________
Basic4android documentation
Reply With Quote
  #22 (permalink)  
Old 11-16-2008, 03:31 AM
Senior Member
 
Join Date: May 2007
Posts: 174
Awards Showcase
Beta Tester 
Total Awards: 1
Default Working on 480x800 screen resolution

Hi Erel,
Thanks a lot!
Here are what I did:
The form size was set to height=800 and width =480
Working on desktop IDE...all controls was sized relative to form size. I have doubled the text size on controls temporarily to get WYSIWYG then put it back to real text size and then compile for device normally.

Working with Device IDE I have done normally and runs WYSIWYG, but need work with subroutine code which doubling the control sizes and locations and activate this subroutine code on desktop before compiling for device normally.

I hope I'm doing the right way. Any other suggestions?
__________________
Rioven

DEVICE: Motorola ATRIX (Dual Core) Android 2.2.1
DESKTOP: Intel Pentium Dual-core E5200; Microsoft® Windows® Vista Home (Basic); Hard Disk:320GB; Memory:4096MB

Last edited by Rioven : 11-16-2008 at 03:34 AM.
Reply With Quote
  #23 (permalink)  
Old 11-16-2008, 06:52 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The device IDE runs in the same mode as Forced QVGA applications.
I'm not familiar with your specific device but in this mode high resolution devices behave in the same way as low resolution devices by using a "pixel doubling" method.
You can create a simple application that shows the width and height of a form.
Compile it with the optimized compiler and run it on the device.
Compare the results with the results you get when running it from the device IDE.
__________________
Basic4android documentation
Reply With Quote
  #24 (permalink)  
Old 11-20-2008, 11:09 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

HI guys...

Enabled by the power of modules and the getcontrols keyword...I was able to put together this very small example and module (AutoAdjust)...

Hope this will simplify the execution of QVGA designer apps NOT forced QVGA compiled, running in vga devices, enabling the auto resizing, and not have to have the config file and the default dll created in Forced QVGA compilation...

This also enables that VGA targeted app can also run, within some limits, in QVGA screens withou having to redo the entire design...Just chnage the "default width in this calculaation:
W=Round(Control(FormName).Width/240,1) '240 in QVGA Portrait Mode, 320 in QVGA Landscape Mode, Double those for VGA Modes..

The limitations are that controls such as comboboxes and NumUpDown will not resiize properly in most cases...But I may be wrong...

For the example I have posted both B4ppc source, and 2 exe's, one ForcedQVGA compiled, and one NOT QVGA compiled, but both Opti-complied...(hope to make sense...)

@EREL, so far no "general use" Modules have been released...I think this is the first one...But perhaps a new sub forum in the samples would be something to think about in the near future....
Attached Files
File Type: zip AutoAdjust.zip (29.2 KB, 90 views)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing

Last edited by Cableguy : 11-20-2008 at 11:30 PM.
Reply With Quote
  #25 (permalink)  
Old 11-21-2008, 06:24 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
@EREL, so far no "general use" Modules have been released...I think this is the first one...But perhaps a new sub forum in the samples would be something to think about in the near future....
What about this one: http://www.basic4ppc.com/forum/code-...ini-files.html ?
Maybe when there are more such modules, we'll add a special sub forum.
__________________
Basic4android documentation
Reply With Quote
  #26 (permalink)  
Old 11-21-2008, 08:05 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by Erel View Post
What about this one: http://www.basic4ppc.com/forum/code-...ini-files.html ?
Maybe when there are more such modules, we'll add a special sub forum.
OOPS....Missed that one...sorry...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #27 (permalink)  
Old 02-18-2009, 10:35 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Here's another way of adapting a QVGA app to VGA using the Door library. Visual Studio 2005 adds this code automatically to a form laid out for a QVGA device so that the form scales up when run on a VGA device. VS2005 also adds the same code, but with the 96s replaced by 192s, for a form laid out for a VGA device so it scales down when run on a QVGA device.

Obj1 and Obj2 are Door library objects. Args is a Door library ObjectArray.
Code:
    Obj1.FromControl("Form1")        
'Form1.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
Args.New1(2)
Args.SetValue(
096"System.Single")
Args.SetValue(
196"System.Single")
Obj2.CreateNew2(
"System.Drawing.SizeF" & Obj2.System_Drawing, Args.Value)        
Obj1.SetProperty2(
"AutoScaleDimensions", Obj2.Value)    
'Form1.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;    
Obj1.SetProperty("AutoScaleMode""Dpi")    
'Form1.PerformAutoScale();
Obj1.RunMethod("PerformAutoScale")
Reply With Quote
  #28 (permalink)  
Old 02-24-2009, 02:20 AM
Senior Member
 
Join Date: May 2007
Posts: 174
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Agraham,
From your code, I have added controls on form1, Compiled, tested, and works perfectly on my 480X800 screen! Wonderful!
I'll implement this in all my apps.

Thank you again!

Regards,
__________________
Rioven

DEVICE: Motorola ATRIX (Dual Core) Android 2.2.1
DESKTOP: Intel Pentium Dual-core E5200; Microsoft® Windows® Vista Home (Basic); Hard Disk:320GB; Memory:4096MB
Reply With Quote
  #29 (permalink)  
Old 02-26-2009, 05:39 PM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default Best way for VGA and QVGA

Agrahm,
I've tested your code too. It works great on my VGA- and my QVGA-device.
Thank You.


Best Regards

berndgoedecke
Reply With Quote
  #30 (permalink)  
Old 04-30-2009, 01:38 AM
Newbie
 
Join Date: Apr 2009
Posts: 5
Default

Quote:
Originally Posted by Cableguy View Post
HI guys...

Enabled by the power of modules and the getcontrols keyword...I was able to put together this very small example and module (AutoAdjust)...

Hope this will simplify the execution of QVGA designer apps NOT forced QVGA compiled, running in vga devices, enabling the auto resizing, and not have to have the config file and the default dll created in Forced QVGA compilation...

This also enables that VGA targeted app can also run, within some limits, in QVGA screens withou having to redo the entire design...Just chnage the "default width in this calculaation:
W=Round(Control(FormName).Width/240,1) '240 in QVGA Portrait Mode, 320 in QVGA Landscape Mode, Double those for VGA Modes..

The limitations are that controls such as comboboxes and NumUpDown will not resiize properly in most cases...But I may be wrong...

For the example I have posted both B4ppc source, and 2 exe's, one ForcedQVGA compiled, and one NOT QVGA compiled, but both Opti-complied...(hope to make sense...)

@EREL, so far no "general use" Modules have been released...I think this is the first one...But perhaps a new sub forum in the samples would be something to think about in the near future....
hehe, works great for me. I'm making a weather plugin for wm6.5 called TitaniumWeather and needed to add a radar option. This worked very good for making my controls vga/qvga without doubling pixels causing distortion on my vga device. Thanks
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiled EXE is not working on HP iPAQ214 mozaharul Questions (Windows Mobile) 25 10-14-2008 11:18 AM
Forelayer not working(?) Cableguy Questions (Windows Mobile) 5 08-16-2008 12:52 PM
working with date gjoisa Questions (Windows Mobile) 3 03-29-2008 10:40 AM
working with FormExDesktop_1.2 Cableguy Questions (Windows Mobile) 20 01-28-2008 07:02 PM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 03:59 AM


All times are GMT. The time now is 09:39 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0