How to modify the size of a form while keeping the content ?

ad.txt

Member
Joined
Oct 4, 2022
Messages
17
Programming Experience
Beginner
Hi !
I've designed a form and I would like to reduce it.
I've already tried to modify the size of it but when I do so I lose some part, it only cuts out part of the form.

Do I have to redesign it on a smaller format or is there another way to reduce it while keeping all the content visible ?
 
This is not a .NET Framework question so it doesn't belong in the .NET Framework forum. The answer is almost certainly going to be specific to the technology being used but you haven't specified what that is. I'm guessing Windows Forms but it could be Web Forms, or perhaps even WPF, UWP or something else. Please specify so we can move the thread to the appropriate forum and provide appropriate advice.

Having said that, what exactly are you expecting to happen? Are you assuming that all the controls will automatically resize and reposition based on the size of the form? That is likely possible but won't happen by default. This is why we need specific details.
 
Ah yes sorry I'm not in the right forum.
I'm using, as you guessed, Windows Forms.
And yes what I'd like to have is the controls resizing and repositioning based on the new size of the Form if it's possible.
 
Look at using the flow layout control and/or the table layout control.
 
If this is just a one-off size change then you should just rearrange the controls as desired. If you want to be able to resize the form at any time then you would use some combination of the Anchor and Dock properties of the controls and the FlowLayoutPanel and TableLayoutPanel controls. This will allow users to maximise or resize the form at run time. If you post a screenshot of your form and describe exactly what you want, we can be more specific.
 
Thank you for your response,

Here is a screenshot of my form. What I'd like to do is to reduce the size of it while keeping the structure.
form.PNG
 
That form is very spaced out to start with, wasting a lot of screen space. By resizing and rearranging all the components you could reduce the dimensions by 40% or even 50%, perhaps removing the need to make it smaller ? Of course you can make it fully responsive by anchoring/docking etc. but I don't think a nice layout is always guaranteed then.
 
What I'd like to do is to reduce the size of it while keeping the structure.
So is it a one-off or are you looking to be able to resize the form arbitrarily from here on?
 
Then you need to just rearrange the layout as you want it. Nothing is going to happen automatically, other than what you have already set up using Anchor properties and the like. That complex layout could not be created and made automatically resizable without several TableLayoutPanel controls.
 
Back
Top Bottom