473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Inherent form controls resize

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
9 2351
BK
Look at the Anchor property

Apr 10 '06 #2
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
"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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Jozef | last post by:
I have some old code that I use from the Access 95 Developers handbook. The code works very well, with the exception that it doesn't seem to recognize wide screens, and sizes tab controls so that...
2
by: Jason | last post by:
Hello I've created a form that serves as a front end for a DB. My question is how to resize the form, and have the control on the form resize themselves as i drag the form. I've got a status...
6
by: Rob | last post by:
I need to create a form that will resize only the verticle size of the Form and not the width. So far I'm partial to the following code. Can someone please elaborate the ??? . . . . Const...
1
by: Kent | last post by:
Hi, I have a form which contain 2 panels, Master and Detail, Master panel is on top and Detail panel is at the bottom. In the form, I set Detail panel to Dock to the bottom and Master panel...
4
by: Philip Wagenaar | last post by:
I have made a form with a tab that containts groupboxes and those contain checkboxes. When I run the application sometimes the outlining for some groupboxes are not shown, if I switch tabs and...
1
by: spamfilteraccount | last post by:
Hi, I want to make a really simple form with C# and windows forms, which is trivial with Java, but I'm unable to reproduce it with .NET. I can't believe it's impossible. I want a simple...
1
by: Bob Alston | last post by:
I have a system where many subforms are used. Often the size of the subform had to be larger than could be displayed without scrolling. I set the height of the subform to the typical height...
14
by: zubair1 | last post by:
Hello, I am want to Resize my form and form controls based on the users resolution. For example :- i am making this application in 1024x768. it obviously works and looks well too me but when my...
10
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.