Solved

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

Posted on 2007-03-30
2
1,763 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
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now