Change ClientSize need to change the Control Size?

  • Thread starter Thread starter active
  • Start date Start date
A

active

It appears to me that if I change the Control's client size the controls
size does not change to agree with the new size.

Does it work like the VB6 ScaleWidth and ScaleHeight?
That is after I change the Clientsize does the display stay the same but the
number of units required to reference a given point changes?

Anyway, it appears to me that If I want to change to size of the control so
that the client size is some value, I need to take the size of borders etc
into acount and change the control's size (rather than changing the
control's clientsize directly). Is that true??

Thank in advance,
Cal
 
Hi Cal,

It may depend on the control. I tried changing the ClientSize of a Form and
of a Button, and in both cases, the size changed to accomodate the new
ClientSize.

Craig,
VB .Net Team
 
Thanks, I think the problem related to the fact that I had anchor set to
"none"

I guess I thought that would let me change position and size but it appears
that even if anchored I can change position programmatically.
I'm not sure what "none" is suppose to do. Do you know?

Thanks again,
Cal
 
Hi Cal,

None should mean it's not anchored. In running some simple code with
buttons and labels, the anchoring doesn't affect the behavior. Are you
possibly setting the Dock property?

Craig VB.Net Team
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).

--------------------
From: " active" <[email protected]>
References: <[email protected]>
 
Craig Vick said:
Hi Cal,

None should mean it's not anchored. In running some simple code with
buttons and labels, the anchoring doesn't affect the behavior. Are you
possibly setting the Dock property?

No.
The problem went away when I fix the anchoring.
 
Back
Top