Form Resize

  • Thread starter Thread starter Ash
  • Start date Start date
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
 
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,

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"
 
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
 
* (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'.
 
Back
Top