By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,396 Members | 2,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,396 IT Pros & Developers. It's quick & easy.

Inherent form controls resize

P: n/a
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
Apr 10 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
BK
Look at the Anchor property

Apr 10 '06 #2

P: n/a
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

"BK" <bk******@hotmail.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
Look at the Anchor property

Apr 10 '06 #3

P: n/a
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 10 '06 #4

P: n/a
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Apr 10 '06 #5

P: n/a
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OF**************@TK2MSFTNGP03.phx.gbl...
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Apr 10 '06 #6

P: n/a
On Tue, 11 Apr 2006 00:07:55 +0100, "Adam Honek"
<Ad*******@Webmaster2001.freeserve.co.uk> wrote:
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 Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OF**************@TK2MSFTNGP03.phx.gbl...
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Apr 11 '06 #7

P: n/a
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" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:e7**************@TK2MSFTNGP04.phx.gbl...
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OF**************@TK2MSFTNGP03.phx.gbl...
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



Apr 11 '06 #8

P: n/a
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

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:e7**************@TK2MSFTNGP04.phx.gbl...
I had to use the split container and panel to get it working, but it
works.

Thanks,

Adam

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OF**************@TK2MSFTNGP03.phx.gbl...
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
> 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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



Apr 11 '06 #9

P: n/a
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

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:eR**************@TK2MSFTNGP04.phx.gbl...
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

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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" <Ad*******@Webmaster2001.freeserve.co.uk> schreef in bericht
news:e7**************@TK2MSFTNGP04.phx.gbl...
I had to use the split container and panel to get it working, but it
works.

Thanks,

Adam

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:OF**************@TK2MSFTNGP03.phx.gbl...
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
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Or**************@TK2MSFTNGP03.phx.gbl...
> "Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> schrieb:
>> 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.
>
> --
> M S Herfried K. Wagner
> M V P <URL:http://dotnet.mvps.org/>
> V B <URL:http://classicvb.org/petition/>



Apr 12 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.