I have been working on a windows form over the last couple days and I have hit a brick wall when trying to move my controls.
I think I have basic understanding of anchoring and docking but I’m not getting the results I’m hoping for so I have attached some screen shots of what I’m trying to do.
It’s not about re-sizing more about moving the controls to the outer edges when my form is maximized.
Picture 1,
This is how it currently looks.
http://i45.tinypic.com/o73toj.jpg
Picture 2,
This is how it looks when I maximize my form.
http://i45.tinypic.com/ru9t2d.jpg
Picture 3,
This is what I’m trying to achieve.
I am not to savvy on Windows Form’s but looking at the documentation I found:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx
With-in this class are properties like:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.right.aspx
I also found:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx
which has the properties:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.width.aspx
and
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.height.aspx
You could probably sort of “scale” the positions on your “components” (text fields, buttons, labels, ect.) by storing the original positions of your components, getting the
height and width of the form, and moving them based on some ratio relative to that (if
I’m making sense, if I’m not I hope you get the general idea of what I am trying to say).