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

  • Home
  • SEARCH
  • 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 624269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:10:56+00:00 2026-05-13T19:10:56+00:00

I have created pictureboxes dynamically in windows forms Application… its working well… now i

  • 0

I have created pictureboxes dynamically in windows forms Application… its working well…
now i have to generate label boxes dynamically and that label boxes will display in bottom of the each picture box and that have to display the corressponding picturebox name…
how shall i do this? Give me the solution of this…

Thanks In Advance…
And My coding Is here..

           int Left = this.Left+200;
           int Top = this.Top;

           for(int i=0;i<Num_Picbox;i++)
           {
           shapes[i] = new PictureBox();
           shapes[i].Location = new Point(Left,Top);
           Left += 200;
           Top += i + 0;

           shapes[i].Size = new Size(160,160);
           shapes[i].BackColor = Color.Black;
           shapes[i].Visible = true;
           shapes[i].Name = i.ToString();
           shapes[i].BorderStyle = BorderStyle.FixedSingle;

           flowLayoutPanel1.Controls.Add(shapes[i]);
           flowLayoutPanel1.WrapContents = true;
           shapes[i].Click += new EventHandler(PictureBox_Click);
          }
  • 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-05-13T19:10:57+00:00Added an answer on May 13, 2026 at 7:10 pm

    Create a panel for each picture that contains a label docked to Bottom and your picture box docked to Fill. Add this panel to the flow layout panel instead of your picture box. Make sure you add your picture box to the panel’s Controls collection first to ensure that the docking works as expected.

    shapes[i].Dock = DockStyle.Fill;
    flowLayoutPanel1.Controls.Add(
        new Panel {
            Controls = {
                shapes[i],
                new Label {
                    Dock = DockStyle.Bottom,
                    Text = i.ToString()
                }
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a Textbox on a Windows Forms, and I need to dynamically
I have to develop Windows C# application, using Visual Studio 2008. It have dynamical
I have a form with a panel docked in it. I then dynamically create
I am creating a few pictureboxes dynamically, then assigning the following: // class variable
I have a created a panel. This has autoscroll = true At the start
So I am writing a small Twitter client for me to use. I am
I want to create a game. Backgammon. i used to design my nuts and
I'm trying to learn C# (so go easy on me!) and as part of
Im doing a Naval Battle for University. I decided to do it in C#.

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.