Article ID: 190224
Article Last Modified on 7/13/2004
Private Sub UserControl_Resize()
' Check to see if the control is larger or smaller than the preset
' minimum or maximum size.
' If it is larger or smaller, set the size of the control.
Select Case Height
Case Is < 2400
Height = 2400
Case Is > 3600
Height = 3600
End Select
Select Case Width
Case Is < 2400
Width = 2400
Case Is > 3600
Width = 3600
End Select
' The label reports the height and width of the control in
' twips even if the container has a different scalemode.
Label1.Caption = "Height: " & Height
Label2.Caption = "Width: " & Width
End Sub
Keywords: kbhowto kbctrlcreate kbcode KB190224