Form Resize

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
 
T

Tom Dacon

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
 
C

Cor Ligthert

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"
 
S

Shiva

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

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
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (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'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top