Le 17/04/2012 08:36, Rolf-Werner Eilert a écrit :
>
> Good morning Benoit,
>
> After thinking this over and trying around a bit this morning, I guess I
> finally understood (sometimes I'm somewhat slow :-) )
>
> With the higher resolution the fonts are enlarged to keep everything
> comfortable and readable. Then all elements in the form are enlarged by
> the same factor to keep the form about the same real-world size it had
> before. My labels, however, still refer to actual XY screen pixels.
>
> I looked into another project this morning and found the same thing:
> forms have been enlarged, fonts are wider, but not every graphic element
> can follow (e. g. there is a photo shown, and it scales too small as the
> frame is shown wider now).
>
> Trying to set this form's (Scaled) to FALSE didn't help, everything
> stays large. Do you have any idea what else I could try to keep
> everything as large as it was created for SXGA?
>
> On the other hand, I don't mind forms adapting to screen resolution, but
> then I will need to somehow read their scaling factor (for such things
> as the photo for instance). Is there any function for it?
>
> Thanks for your help.
>
> Regards
>
> Rolf
>

You must use MoveScale() and ResizeScaled() when creating controls 
manually, instead of Move() and Resize(). These functions just multiply 
their arguments by the scale factor (which is Desktop.Scale).

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to