Solved

VB6 form: How change Container of control at run-time?

Posted on 2007-03-30
2
1,984 Views
Last Modified: 2013-12-20
On a complex VB6 form, how could I change a control (textbox etc) container from one container (e.g SSTab or Frame) to a different container on same form at run-time?
The Container Property seems to be read only....
0
Comment
Question by:mvanral
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18823942
It works fine for me...

I put a CommandButton (Command1) and two Frames (Frame1, Frame2) on my form.  Then I placed a TextBox (Text1) into Frame1.

    Private Sub Command1_Click()
        Set Text1.Container = Frame2
    End Sub

When I click the button, the TextBox moved from Frame1 to Frame2.

You said you have a "complex VB6" form.  Could you explain in more detail?...

0
 

Author Comment

by:mvanral
ID: 18824048
Well, that worked, i feel a little silly... (and you lucky - for points)
i overlooked the "Set" and i then found information saying contained property "read-only"
It works - thx
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question