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 8946683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:34:47+00:00 2026-06-15T12:34:47+00:00

I have a feeling that Im am missing something obvious but: I have a

  • 0

I have a feeling that Im am missing something obvious but:

I have a single row of pictures in a form, in theory the pictures could go on forever. I need a scroll bar so that the user can look at all of the pictures in the row. I know I need to enable auto scroll but I have no idea how to enable it. Can someone tell me how to enable it or something that I am missing?

If it helps this is the code i am using to generate the pictures:

private void imagePalletToolStripMenuItem_Click(object sender, EventArgs e)
    {

        MyPalletGui.Show();

        Dictionary<string,Bitmap> MyPallet = MyImageCollection.ToDictionary();
        int xcor = -50;
        int ycor = 0;
        foreach (Bitmap curtImage in MyPallet.Values){
            PictureBox myPicBox = new PictureBox();
            xcor += 50;
            myPicBox.Location = new Point(xcor, ycor);
            myPicBox.Width = 50;
            myPicBox.Height = 50;
            myPicBox.Visible = true;
            myPicBox.Image = new Bitmap(curtImage);
            this.MyPalletGui.Controls.Add(myPicBox);
  • 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-15T12:34:48+00:00Added an answer on June 15, 2026 at 12:34 pm

    This code will do exactly what you want, it uses the Form as the ViewPort with AutoScroll:

    public Form1()
    {
    InitializeComponent();
    
    PopulatePictures();
    }
    
    private void PopulatePictures()
    {
    this.AutoScroll = true;
    
    string[] list = Directory.GetFiles(@"C:\\Users\\Public\\Pictures\\Sample Pictures", "*.jpg");
    PictureBox[] picturebox= new PictureBox[list.Length];
    int y = 100;
      for (int index = 0; index < picturebox.Length; index++)
      {
      picturebox[index] = new PictureBox();
      this.Controls.Add(picturebox[index]);
      picturebox[index].Location=new Point(index * 120, y);
      if(x%12 == 0)
      y = y + 150;
      picturebox[index].Size = new Size(100,120);
      picturebox[index].Image = Image.FromFile(list[index]);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling that I'm missing something obvious but can't seem to resolve
I have a feeling this is something very obvious that I'm missing, but here
I have a feeling I'm missing something obvious, but... All my neat jQuery functions
I have that sneaking feeling I'm missing something obvious: I ran RAILS_ENV=production bundle exec
I have a feeling that I'm missing something simple here but can't seem to
I have the feeling that i'm missing something key here. I've tried following guides
I have a feeling I'm missing something simple here, but just can't quite grok
This is something simple I'm missing I bet and I have a feeling it's
I have a feeling I'm missing something very simple here. I have a class
I have a feeling that this query is pretty easy to construct, I just

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.