Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: VB6
Expertise: Intermediate
Jun 7, 2006



Application Security Testing: An Integral Part of DevOps

Create a Control Array at Runtime Instead of Design-time

To create and access the control arrays as though they were created at design time, simply follow these steps and use the code. This example creates an array of text boxes at runtime.
  1. Start a new VB project.
  2. Place a textbox on the form.
  3. Name the textbox txtarray.
  4. Set the Index property to 0.
  5. Paste the following code into the form and run the program.
    Private Sub Form_Load()
    Dim i As Integer
      txtArray(0).text = "0"
      For i = 1 To 5
        Load txtArray(i)
        With txtArray(i)
          .Text =  i
          .Visible = True
          .Top = txtArray(i - 1).Top + 550
        End With
      Next i
    End Sub
Prabha Natarajan
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date