Can't you calculate everything in pixels initialy and change the Form.ScaleMode to foxels when everything is done? The form will keep it's layout and you have your foxels as mesurement unit.
Vlad
>It seems I've already done what could be done. Textwidth() is obviously giving me the correct pixel size, it's just the matter of recalculating it into foxels.
>
>In all graphical systems I've used so far I've opted for vector against bitmap. It's more precise and scalable. My favorite solution for that is using just foxels and setting the fontsize before showing the form. It all works fine, and I don't have to worry about resizing - just about sizing :). That's my pros, and you're right about the cons. Making it simpler, it sure does, but... well, this is OOP. Any problem vanishes if its solution can be stuffed into a class - it distributes nicely afterwards.
>
>Of course, showing it all and then setting the properties (with .autosize going last) is not useful in my case - I'm building, say, three labels, three textboxes and then checking for their widths, then aligning them row by row, positioning the yes/no commandgroup below them, resizing the form so it all fits, and then centering the form, and then showing it all. If it had to be visible to work, the user would have to watch controls dancing around every time. No way to go this time.
>
>So, I'll rephrase my question: how do I recalculate pixels into foxels? If it's not FONTMETRIC(6, g_FontName, g_FontSize), then what is?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only