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