c# winform scaling

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

i developed my application for window resolution 1280*1024

now i have a remote maschine using a window resolution of 1024*768

is there a easy way to scale alle the object in the form?

tnx for help!
greetings
joszi
 
Forms have an AutoSclae property by default equals to true.
just change the font of your font, that might do the trick...
 
Just use the Anchor and Dock properties of the controls to allow them to
resize accordingly with the form. It takes a bit of planning at design
time, but it's well worth the effort.

- Glen
 
Well in my apps, I use the docking property to autoscale and move objects in
a form.
If the size of the form changes, the size of textareas and trees and other
things change too.

For Example:
U want to have some labels and textfields in the upper part of your window.
the labels should
have a fixed size and the textfields should resize with the size of the
window.
If u want more than one textfield and label, u need 3 panel.
put the label in panel2 and the textfields in panel3.
put panel2 and panel3 in panel1. then set the dock of panel2 to left and the
dock of panel3 to center.
then put panel1 in the mainwindow and set the dock to top.
that's it. should look like the MS Outlook window for writing emails. like
the To, CC, and about fields.
maybee u have to play a bit with the option "foreground" and "background" of
the panels and fields and labels.
depending on how u set this, it looks good or crappy.

And if something is not possible to build with the dock property, then i add
a listener to the
window resized event and do the resizing by myselfe.

but i did'nt need it until now.
 
And how exactly will this solve his problem? Jozsi has already designed
and implemented his user interface.
 
tnx a lot for the answers.
i thing, i can handle the problem with the font size and where needed i will
recalculate the size of the controls like listview.
greetings
joszi
 
Back
Top