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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:48:35+00:00 2026-06-14T15:48:35+00:00

When I say I’m a beginner, I really am as fresh as you can

  • 0

When I say I’m a beginner, I really am as fresh as you can get so apologies up front!

What I am trying to do is in a form have two picture boxes and a button. When I click on the button it picks 2 new images from my image folder and it will do this a total of 5 times

Any ideas how I approach this – Here’s what I have so far for the button click

 private void button1_Click(object sender, EventArgs e)
    {
      pictureBox1.Load(@"C:\Resources\PICT01.JPG");
      pictureBox2.Load(@"C:\Resources\PICT02.JPG");
}

Any answers really need to be basic as I am just learning ! Thanks in advance

  • 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-14T15:48:36+00:00Added an answer on June 14, 2026 at 3:48 pm

    You need to create a global int to keep track of how often you have switched pictures, and handle that number in your button1_click.

    I’m no expert myself but here’s how i would do it. A switch is ideal here because you need to check 5 different possibilities.

    //global int
    int count = 0;
    
    private void button1_Click(object sender, EventArgs e)
    {
      count++;
      switch(count)
      {
         case 1:
           //load image 1 and 2
           break;
         case 2:
           //load image 3 and 4
           break;
         case 3:
           //load image 5 and 6
           break;
         case 4:
           //load image 7 and 8
           break;
         case 5:
           //load image 9 and 10
           break;
         default: 
           break;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have two Strings: SomeTextHereThatIsTheSource SomeTextHereThatIsCloseToTheSourceButNotTheSame Is there a slick .net way to
Say I have the next form: <form action=/orders/add class=form-horizontal id=OrderAddForm method=post> <div style=display:none;><input type=hidden
Say I have two classes like this: class A{ private static Random random =
Say I have this form : <form> <table> <tbody> <tr> <td style=font-family : Arial>
Say I have two lists [16, 0, 0, ';', 17, 0, 2, ';', 0,
Say I have two gmpy2.mpc objects x and y precise to p bits. When
Say I have a form, with a menu bar on it. I have an
Say I have the following form that's in classic asp: <form name=impdata id=impdata method=POST
Say Suppose you have a class public class Person { public int PesronId{get;set;} public
Say, if I have a thread ID, can I be assured that it will

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.