|
-
Oct 1st, 2002, 09:01 AM
#1
Thread Starter
Addicted Member
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.
Last edited by Aldragor; Oct 7th, 2002 at 06:58 AM.
-
Oct 6th, 2002, 04:39 AM
#2
Lively Member
Re: Controling Height and Width of component when creating
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|