Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / August 2007

Tip: Looking for answers? Try searching our database.

Form layout on VGA devices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David - 28 Aug 2007 19:30 GMT
I'm in the process of porting a CF1 app to CF2.

I have designer-generated "InitializeComponent" code to lay out forms. Under
CF1 the forms look fine on VGA devices, but under CF2, the coordinate system
is all wrong. The controls are squeezed together at half the desired
width/height.

I tried overriding the form's ScaleChildren property but it made no
difference.

Can anyone shed any light?

Thanks!
--
David
Christian Resma Helle - 28 Aug 2007 19:46 GMT
Hi David,

Try setting the Form's AutoScaleDimension to 96 x 96 and the Form's
AutoScaleMode to Dpi

Signature

Regards,
Christian Resma Helle
http://christian-helle.blogspot.com

> I'm in the process of porting a CF1 app to CF2.
>
[quoted text clipped - 13 lines]
> --
> David
David - 30 Aug 2007 17:00 GMT
Thanks for the tips!

FWIW, I found that I could only set the AutoScaleDimension to 96x96 after
calling SuspendLayout. Otherwise, the change was ignored.

And after calling ResumeLayout, the AutoScaleDimension reverts to its
previous value (192x192).

This means that any sizes saved during form construction (e.g.saving the
original screen size in OnResizing) are in the wrong scaling factor. Easily
worked around though...

--
David

> Hi David,
>
> Try setting the Form's AutoScaleDimension to 96 x 96 and the Form's
> AutoScaleMode to Dpi
dbgrick - 28 Aug 2007 20:34 GMT
You can also adjust your draw routing to account for screen resolution.  I
usually scale based on 240x320 and then adjust up or down based on a scaling
factor.

Rick D.
Contractor

> I'm in the process of porting a CF1 app to CF2.
>
[quoted text clipped - 11 lines]
> --
> David
Simon Hart - 28 Aug 2007 20:56 GMT
This link might help:
http://msdn2.microsoft.com/en-gb/windowsmobile/bb264320.aspx

Signature

Simon Hart
http://simonrhart.blogspot.com

> I'm in the process of porting a CF1 app to CF2.
>
[quoted text clipped - 11 lines]
> --
> David

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.