Solved

Problem with Control Arrays

Posted on 1998-07-02
2
124 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

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

18 Experts available now in Live!

Get 1:1 Help Now