We help IT Professionals succeed at work.
Get Started

Fixed positions vs relative positions under WinForms

Ahmet Ekrem SABAN
on
5,792 Views
Last Modified: 2012-05-12
Hello!

I am working on my first C# project that uses Windows Forms. I have already designed and partially implemented a number of screen masks with Microsoft Visual Studio 2010 by placing the elements of the toolbox, giving the variables proper names, etc. etc.

Now, I want that the whole design is a little bit more flexible. Instead of a fix position of a group box at the fixed location of 1052, 34, say, I want the positioning to be proportional of the window size.

There is a trivial and tedious way to go through all screen masks, especially through the MVS2010-generated method InitializeComponent(), and change all the positionings and sizes to the appropriate percentage of the screen width and height.

Well, this can be done, but I am asking for a more easy and probably automatic way of changing a design from "fixed" to "flexible". Do you know an easy way to switch from one way to another?

Thank you for your help!
Comment
Watch Question
Development, GIS Consultant - Haram Presidency
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE