|
-
Dec 14th, 2001, 07:24 AM
#1
Thread Starter
Fanatic Member
Container
Can anyone give a good and practical example where and how use the control called container?
-
Dec 14th, 2001, 07:28 AM
#2
Conquistador
the control?
isn't it a parent object?
-
Dec 14th, 2001, 07:31 AM
#3
Well ...
I don't think Container refers to a control by itself. I mean it's not something like a Textbox. For each control, the .Container object returns the reference of the control in which the said control is. For e.g. if you have a form and a textbox in that form, the form would be the container of the textbox. If you paste the following code in a form that has a textbox named Text1, you would see it right away:
VB Code:
Private Sub Form_Click()
MsgBox Text1.Container.Name
End Sub
Put a frame on the form named Frame1 and change the above code to :
VB Code:
Private Sub Form_Click()
Set Text1.Container = Frame1
End Sub
Moreover the following is given in MSDN
Returns or sets the container of a control on a Form. Not available at design time.
Containers can be either forms, pictureboxes and frame controls.
.
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
|