Home > Software engineering >  Excuse me, how to adjust the size of the user controls UserControl?
Excuse me, how to adjust the size of the user controls UserControl?

Time:09-28


I created a user control with VB
By:
IWidth=UserControl. ScaleWidth
IHeight=UserControl. ScaleHeight
Get the user control the width and height, but it seems that these properties are read-only, excuse me, how to use code sets the user controls the width and height?
Thank you very much!

CodePudding user response:

Directly in Form1 control line ah, don't need to control in control itself,

CodePudding user response:

(ScaleWidth, ScaleHeight) is to control internal size,
The size of the controls on the form is (Width, Height),
Both can be different coordinate unit; Even if the coordinate unit is consistent, controls have borders when two size is different also,

CodePudding user response:

On the first floor is too great, hold,

CodePudding user response:

The
reference 3 floor vansoft response:
on the first floor is too great, oh, hold

Alas, this classmate don't listening in class again, really, when the teacher is too tired,

CodePudding user response:

reference 1st floor Carlven2012 response:
directly in Form1 control line ah, don't need to control in control itself,



You said this, I know some, but my problem is different,
Is an ocx control for me to do, and I want to control the size of the internal code ocx control, but if the relevant parameters such as width are read-only, also please the teacher guidance, thank you!

CodePudding user response:

UserControl.
Width=XXXUserControl. Height=XXX

If not written above, it would be strange
I used to write the method
  • Related