Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:37:22+00:00 2026-06-11T07:37:22+00:00

I figured out how to add a control to my form based on the

  • 0

I figured out how to add a control to my form based on the number of items added to a listbox.

    ListBox1.Items.Add(TextBox1.Text)
    TextBox1.Text = ""

    For i As Integer = 0 To ListBox1.Items.Count - 1

        'adds picturebox for as many listbox items added
        Dim MyPictureBox As New PictureBox()
        MyPictureBox.Location = New Point(25, 25)
        MyPictureBox.Size = New Size(15, 15)
        MyPictureBox.SizeMode = PictureBoxSizeMode.StretchImage
        Me.Controls.Add(MyPictureBox)
        MyPictureBox.Image = My.Resources.PDF_Info

    Next i

What I can’t seem to figure out is how to add a second control, but add it in another location on the form.

So the first entry would place the picturebox at 25, 25 and when I enter a second item, it’ll create another picturebox at 45, 45 and etc.

Can this be done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:37:23+00:00Added an answer on June 11, 2026 at 7:37 am
      ListBox1.Items.Add(TextBox1.Text)
    TextBox1.Text = ""
    Dim x As Integer = 25
    For i As Integer = 0 To ListBox1.Items.Count - 1
    
        'adds picturebox for as many listbox items added
        Dim MyPictureBox As New PictureBox()
        MyPictureBox.Location = New Point(x, x)
        MyPictureBox.Size = New Size(15, 15)
        MyPictureBox.SizeMode = PictureBoxSizeMode.StretchImage
        Me.Controls.Add(MyPictureBox)
        MyPictureBox.Image = My.Resources.PDF_Info
        x += 25
    Next i
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I figured out how to clone my form rows and append an incriminting number
OK, I finally figured out how to add (or edit) form controls through the
I have figured out how to add a custom calendar within my iPhone app,
I did some all day learning and I figured out how to add rows
I have searched around an figured out how to add a UISegmentedControl item to
I'm trying to figure out how to add the following data to my json
How to customize KNPMenuBundle? I can't figure out how to add an image or
I am trying to figure out the canonical way to add elements to a
I can't figure out how to get a C# add-in built with VS 2010
I'm trying to figure out a nice way to add a busy animation to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.