Home All Groups Group Topic Archive Search About

Inherent form controls resize

Author
10 Apr 2006 8:42 PM
Adam Honek
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

Author
10 Apr 2006 7:55 PM
BK
Look at the Anchor property
Author
10 Apr 2006 10:24 PM
Adam Honek
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

Show quoteHide quote
"BK" <bkunn***@hotmail.com> wrote in message
news:1144698951.863567.313310@v46g2000cwv.googlegroups.com...
> Look at the Anchor property
>
Author
10 Apr 2006 9:31 PM
Herfried K. Wagner [MVP]
"Adam Honek" <AdamHo***@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/>
Author
10 Apr 2006 10:39 PM
Adam Honek
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


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
> "Adam Honek" <AdamHo***@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/>
Author
10 Apr 2006 11:07 PM
Adam Honek
I had to use the split container and panel to get it working, but it works.

Thanks,

Adam

Show quoteHide quote
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
news:OF0aIdOXGHA.1476@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]" <hirf-spam-me-here@gmx.at> wrote in message
> news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
>> "Adam Honek" <AdamHo***@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/>
>
>
Author
11 Apr 2006 2:13 AM
gene kelley
On Tue, 11 Apr 2006 00:07:55 +0100, "Adam Honek"
<AdamHo***@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





Show quoteHide quote
>"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
>news:OF0aIdOXGHA.1476@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]" <hirf-spam-me-here@gmx.at> wrote in message
>> news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
>>> "Adam Honek" <AdamHo***@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/>
>>
>>
>
Author
11 Apr 2006 6:49 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht
news:e7bJ7sOXGHA.4132@TK2MSFTNGP04.phx.gbl...
>I had to use the split container and panel to get it working, but it works.
>
> Thanks,
>
> Adam
>
> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
> news:OF0aIdOXGHA.1476@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]" <hirf-spam-me-here@gmx.at> wrote in message
>> news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
>>> "Adam Honek" <AdamHo***@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/>
>>
>>
>
>
Author
11 Apr 2006 11:59 PM
Adam Honek
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

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:%23EeijPTXGHA.3864@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" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht
> news:e7bJ7sOXGHA.4132@TK2MSFTNGP04.phx.gbl...
>>I had to use the split container and panel to get it working, but it
>>works.
>>
>> Thanks,
>>
>> Adam
>>
>> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
>> news:OF0aIdOXGHA.1476@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]" <hirf-spam-me-here@gmx.at> wrote in message
>>> news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
>>>> "Adam Honek" <AdamHo***@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/>
>>>
>>>
>>
>>
>
>
Author
12 Apr 2006 5:45 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht
news:eR9NLubXGHA.3972@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]" <notmyfirstn***@planet.nl> wrote in message
> news:%23EeijPTXGHA.3864@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" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht
>> news:e7bJ7sOXGHA.4132@TK2MSFTNGP04.phx.gbl...
>>>I had to use the split container and panel to get it working, but it
>>>works.
>>>
>>> Thanks,
>>>
>>> Adam
>>>
>>> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message
>>> news:OF0aIdOXGHA.1476@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]" <hirf-spam-me-here@gmx.at> wrote in message
>>>> news:Or1FiYOXGHA.1196@TK2MSFTNGP03.phx.gbl...
>>>>> "Adam Honek" <AdamHo***@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/>
>>>>
>>>>
>>>
>>>
>>
>>
>
>