-
October 29th, 2002, 05:07 AM
#1
resizing a user control
i've created a user control and compiled it into ocx, the problem is that when i've added that into the control box component, the control does not resize....how could could make my compiled control resizable?
-
October 29th, 2002, 07:55 AM
#2
What do you mean that the control does not resize? Are you talking about the USERCONTROL object or the CONTROL that you have on the USERCONTROL object? Can you post a sample OCX project that does not work?
-Cool Bizs
-
October 29th, 2002, 09:26 AM
#3
in the vb help you will find the following as well as more examples and instruction on how to do what you are trying to do.
"Creating an ActiveX Control"
"Running the ShapeLabel Control at Design Time"
...
To add code to the Resize event
In the Project Explorer window, double-click ShapeLabel to make it the active designer.
Double-click the ShapeLabel control to open the code window.
In the Procedure box, click the Resize event to go to its event procedure. Add the following code:
Private Sub UserControl_Resize()
Static intCt As Integer
intCt = intCt + 1
Debug.Print "Resize " & intCt
End Sub
Note The name of the event procedure has the prefix "UserControl," just as the Form_Resize event procedure for an ordinary form has the prefix "Form."
Elizabeth
-
October 29th, 2002, 11:45 PM
#4
btw, coolbiz i'm referring to the UserControl size,
Thanks to both of you (EAK,coolbiz), i've just found a solution on that problem...
-
October 30th, 2002, 07:38 AM
#5
Care to share it with us?
-Cool Bizs
-
November 11th, 2002, 06:06 AM
#6
sure, comrade...
sure..
here it is..
I'm using a datepicker and combo box in my user control.
The datepicker is at the back/below of the combo box.
I'm trying to combine the capability of both controls through making this user control. I've posted a question here, since everytime i resize the UserControl, the combo box and datepicker does not resize.
Thank you for your advice.
'--- The code..
Private Sub UserControl_Resize()
Combo1.Top = UserControl.ScaleTop
DTPicker1.Top = UserControl.ScaleTop
Combo1.Width = UserControl.Width
DTPicker1.Width = UserControl.Width
UserControl.Height = Combo1.Height
End Sub
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
|