Problem with Control Arrays
Posted on 1998-07-02
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
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.