Inherent form controls resize

  • Thread starter Thread starter BK
  • Start date Start date
Hi,

In VB6 and earlier if the form size was expanded by the user or maximized
there had to be specific code to handle controls on the form to scale with
with it.

In VB.net I recall in one of the MSDN videos seeing that Windows forms have
a property that auto scale controls within the form.

The problem is I don't see it and the ones I try don't work.

What are my eyes not seeing?

Thanks,
Adam
 
Adam Honek said:
I'm getting funny behavior, either it won't scale (the controls) or they
scale overlapping each other, or further still they just move to the edge
of the form.

If you refer to automatical scaling of controls, fonts, images, etc.,
then -- no, there is no built-in support for doing that.
 
Is that all I need to set?

I'm getting funny behavior, either it won't scale (the controls) or they
scale overlapping each other, or further still they just move to the edge of
the form.

Adam
 
Perhaps scaling is not the right word.

Resizing to fit the container (ie form) when it is resized by the user (ie
mouse drag or maximum button).

I can get it to semi work but my form has a listview at the top half and a
rich text box in the bottom. Depending how I set it one of these will take
control over the entire vertical space thus overlapping (ie hiding) the
other.

I can't really specify a maximum size as I don't know the user's screen
resolution.

Adam
 
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam

Adam Honek said:
Perhaps scaling is not the right word.

Resizing to fit the container (ie form) when it is resized by the user (ie
mouse drag or maximum button).

I can get it to semi work but my form has a listview at the top half and a
rich text box in the bottom. Depending how I set it one of these will take
control over the entire vertical space thus overlapping (ie hiding) the
other.

I can't really specify a maximum size as I don't know the user's screen
resolution.

Adam
 
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam

If you don't particularly want a splitter, the TableLayoutPanel
control will do what you want to do.

Gene




 
Adam,

The Dock properties from the split container are automaticly at startup set
to Fill.

Therefore what you are looking for is probably the Dock property.

Cor

Adam Honek said:
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam
 
Unless I leave the dock at "none" the control overlaps the menu strip and
forces it way to the window border.

Plus the dock can only be left, right, top, bottom, center but never more
than 1.

I can't get it to work without the anchor settings.

Adam
 
Adam,

That has (as I understand you well) to do with the Z order. Which means in
the way the controls are set on the form.

The last has the priority therefore Z.

Cor
 
Back
Top