Results 1 to 5 of 5

Thread: [RESOLVED] Move existing controls to new frame?

  1. #1

    Thread Starter
    Member KodeWorrier's Avatar
    Join Date
    Nov 2005
    Location
    Vermont
    Posts
    55

    Resolved [RESOLVED] Move existing controls to new frame?

    Clearly this is something that should be taken care of in the planning stage, but so far there have been at least three times that I had to remake whole racks of buttons, checkboxes and listboxes so that they would be in a frame and I could manage them as a group rather than one by one.

    So is there any way to tell a control that it now belongs to a frame?
    The man who sets out to carry a cat by its tail
    learns something that will always be useful and
    which will never grow dim or doubtful. - Mark Twain

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Move existing controls to new frame?

    All controls have a Container property. So at runtime its simply

    Set Command1.Container = Frame1

    At design time you can highlight all desired controls and basically cut and paste them to the Frame. Note that this method causes VB to change the existing value of the Index (for control arrays) and TabIndex properties.
    Last edited by brucevde; Dec 3rd, 2005 at 11:44 AM.

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Move existing controls to new frame?

    I am pretty sure that MZTOOLS can do what you want. I know that you can move code to a new form. It shouldn't be hard to move controls. You probably could copy/paste them into a frame.

  4. #4

    Thread Starter
    Member KodeWorrier's Avatar
    Join Date
    Nov 2005
    Location
    Vermont
    Posts
    55

    Re: Move existing controls to new frame?

    Quote Originally Posted by brucevde
    Set Command1.Container = Frame1
    <snip>
    cut and paste them to the Frame.
    Ah...

    If only the rest of my life was so simple. Thanks.
    The man who sets out to carry a cat by its tail
    learns something that will always be useful and
    which will never grow dim or doubtful. - Mark Twain

  5. #5

    Thread Starter
    Member KodeWorrier's Avatar
    Join Date
    Nov 2005
    Location
    Vermont
    Posts
    55

    Re: Move existing controls to new frame?

    Quote Originally Posted by dglienna
    I am pretty sure that MZTOOLS can do what you want.
    I just got finished trying MZTools, pretty cool. Thanks.
    The man who sets out to carry a cat by its tail
    learns something that will always be useful and
    which will never grow dim or doubtful. - Mark Twain

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