Controling Height and Width of component when creating (Resolved)
I want to set a property when dropping my ocx in a form.
More specificaty, I want to set a property depending on witch of Height or Width is the bigger the first time my object is created on the user form using my component.
Example: my component draw a line and depending of the box size, when creating the line, the line will be vertical or horizontal.
If you have any clues or hints, it will be appeciated.
:rolleyes:
Re: Controling Height and Width of component when creating
Quote:
More specificaty, I want to set a property depending on witch of Height or Width is the bigger the first time my object is created on the user form using my component.
You must use a flag on the Resize event.
Code:
Private bFirstTime As Boolean
Sub Usercontrol_Initialize
bFirstTime = True
End Sub
Sub Usercontrol_Resize
If (bFirstTime) Then
' do it the first time!
Else
bFirstTime = False
End If
End Sub
Cya