Results 1 to 3 of 3

Thread: Container

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking Container

    Can anyone give a good and practical example where and how use the control called container?

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    the control?

    isn't it a parent object?

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    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:
    1. Private Sub Form_Click()
    2.     MsgBox Text1.Container.Name
    3. End Sub


    Put a frame on the form named Frame1 and change the above code to :
    VB Code:
    1. Private Sub Form_Click()
    2.     Set Text1.Container = Frame1
    3. 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.
    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width