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

Form Resize

P: n/a
Ash
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
The Form's ClientSize property gives you the width and height of the client
area of the form. There's also a ClientRectangle property from which the
same information can be retrieved.

Forms no longer have a ScaleMode property; the values in the ClientSize and
ClientRectangle objects are always in pixels.

Tom Dacon
Dacon Software Consulting

"Ash" <as**********@gmail.com> wrote in message
news:f8*************************@posting.google.co m...
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash

Nov 21 '05 #2

P: n/a
Ash,

Beside the dock is the anchor, very usefull property.

With the dock property you have to take care at the Z order from adding it
to the form controls.
(from the end to the start)

(when you add controls using the designer you can see that almost at the
bottom of the designer generated code. When you do it right it gives
normally no problem when you rearange that part)

I hope this helps?

Cor

"Ash"

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash

Nov 21 '05 #3

P: n/a
Hi,
Check out the Anchor and Dock properties of the control for
resizing/docking.

"Ash" <as**********@gmail.com> wrote in message
news:f8*************************@posting.google.co m...
Hi,

I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?

Thanks for your help,
Ash
Nov 21 '05 #4

P: n/a
* as**********@gmail.com (Ash) scripsit:
I am just starting to switch from VB6 to VB.NET.

I am trying to resize controls on my form and recently found out that
ScaleWidth, ScaleHeight etc is no longer supported.

I have used docking with some controls and that works fine for some
but not on others.

When I use like Me.Width, some of the control is hidden under the form
borders.

Is there anything like ScaleWidth/Height that I can use?


'Me.ClientSize.Height', 'Me.ClientSize.Width'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5

P: n/a
Ash
Thanks Everyone!
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.