[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

swap a controls container at runtime

Posted on 2006-05-03
2
Medium Priority
?
158 Views
Last Modified: 2010-04-07
I have a frame (frame 'child') (with controls nested in it). This frame is itself contained in another Frame (Frame 'A').
Now, based on the user preferences I wish to move the frame (frame 'child') to another container frame ('frame B').

So, how would I do this?
0
Comment
Question by:mccainz2
2 Comments
 
LVL 5

Author Comment

by:mccainz2
ID: 16600949
ADDENDUM....

Here is the txt from a form file that illustrates the concept.... and why it isnt working as intended



VERSION 5.00
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   3165
   ClientLeft      =   60
   ClientTop       =   375
   ClientWidth     =   4635
   LinkTopic       =   "Form1"
   ScaleHeight     =   3165
   ScaleWidth      =   4635
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame1
      Caption         =   "Frame1"
      Height          =   2985
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   4515
      Begin VB.Frame Frame2
         Caption         =   "Frame2"
         Height          =   1125
         Left            =   180
         TabIndex        =   2
         Top             =   270
         Width           =   1695
      End
      Begin VB.Frame Frame3
         Caption         =   "Frame3"
         Height          =   1545
         Left            =   2130
         TabIndex        =   1
         Top             =   330
         Width           =   2325
         Begin VB.Frame Frame5
            Caption         =   "Frame5"
            Height          =   825
            Left            =   690
            TabIndex        =   4
            Top             =   180
            Width           =   1515
            Begin VB.CommandButton Command1
               Caption         =   "Command1"
               Height          =   315
               Left            =   330
               TabIndex        =   5
               Top             =   330
               Width           =   1035
            End
         End
      End
      Begin VB.Frame Frame4
         Caption         =   "Frame4"
         Height          =   1215
         Left            =   390
         TabIndex        =   3
         Top             =   1560
         Width           =   1605
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()

    Frame5.Container = Frame2
 
End Sub

0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 800 total points
ID: 16604529
do

set Frame5.Container = Frame2
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

873 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