[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2007-03-30
2
Medium Priority
?
2,127 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

656 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