how to make window form control scale with the form
-
hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text
Scaling is not a very definitive term in this case. You need to describe what each child control is. Is this for "zomming" graphics of some sort? If so, read up on the PictureBox functionality.
Be nice to your kids. They'll choose your nursing home.
My Articles Developer's Best Friend -
hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text
If it is just increase in the size of controls, proper anchoring/docking would do. You can use the TableLayoutPanel, it makes life easier. For the text, you will have to redraw it using the methods in the Graphics class. You will need to use MeasureString and DrawString methods.
-
hi i am using vs.net 2005 with c# window form does anyone know how to make all the control inside the window form scale with the form e.g when i enlarge the window form by 20% so will the control scale with it and also the text
Ok, others said what you have to do (doking, manual resizing of the fonts and graphics, etc.) What comes to my mind, when I hear such a requirement is: Is this really what you should do? How many applications have you seen behaving like that (no dynamic layout but real resizing of a static layout)? And if this is real necessary (because you are writing an app for visually impaired, or whatever) you are maybe using the wrong platform. (e.g Scaling is very simple to do with WPF/Silverlight)