Solved

Problem with Control Arrays

Posted on 1998-07-02
2
128 Views
Last Modified: 2010-05-03
I have a Frame on my program's main form.  In this Frame I have a Picturebox and a Textbox.  Now I have button that when I click this button I want to dynamically add a new Frame with Picturebox and Textbox to the bottom of the form.

This is the code I have to add the controls.
  iCounter = iCounter + 1
  Load Frame(iCounter)
  Load imgPicture(iCounter)
  Load txtAdCopy(iCounter)
  imgPicture(iCounter) = LoadPicture(sFilename)
  txtAdCopy(iCounter) = sAdCopy
  Frame(iCounter).Top = (iCounter * Frame(iCounter).Height) - 100
  Frame(iCounter).Visible = True
  imgPicture(iCounter).Visible = True
  txtAdCopy(iCounter).Visible = True
  Me.Height = Frame(iCounter).Top + Frame(iCounter).Height + 900

Now when this executes I have get a new frame that appears in the correct location, but I don't have any Picture Controls or Textboxes.  I know they are being created, because I'm setting there values to something without any problem.  Where are they and how to I have to position them so that they are in the Frame.
0
Comment
Question by:Jagar
2 Comments
 
LVL 6

Accepted Solution

by:
anthonyc earned 50 total points
ID: 1464797
yes, you can do this:
set imgPicture(iCounter).container = frame(iCounter)


0
 
LVL 2

Author Comment

by:Jagar
ID: 1464798
Thanks that is what I was looking for.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

770 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