Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Display images in PictureBox

Display images in PictureBox

Scheduled Pinned Locked Moved C#
tutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    praveen pandey
    wrote on last edited by
    #1

    hi all, How to display 5 or more images in a PictureBox in quick succession say within 2 seconds? Thanks and regards, praveen

    C 1 Reply Last reply
    0
    • P praveen pandey

      hi all, How to display 5 or more images in a PictureBox in quick succession say within 2 seconds? Thanks and regards, praveen

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      By setting a timer, and changing the image every time ?

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      P 1 Reply Last reply
      0
      • C Christian Graus

        By setting a timer, and changing the image every time ?

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        P Offline
        P Offline
        praveen pandey
        wrote on last edited by
        #3

        Thanks for reply. Can you give code snippet or some hint how to do this? thanks again..

        C 1 Reply Last reply
        0
        • P praveen pandey

          Thanks for reply. Can you give code snippet or some hint how to do this? thanks again..

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Timer timer = new Timer(); timer.Interval = 2000/numberOfImages; timer.Tick += delegate { ++imageToShow; if (imageToShow > imageCount) imageToShow = 0; pictureBox.Image = images[imageToShow]; }; timer.Start(); This assumes those other variables contain the necessary data, of course.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          P 1 Reply Last reply
          0
          • C Christian Graus

            Timer timer = new Timer(); timer.Interval = 2000/numberOfImages; timer.Tick += delegate { ++imageToShow; if (imageToShow > imageCount) imageToShow = 0; pictureBox.Image = images[imageToShow]; }; timer.Start(); This assumes those other variables contain the necessary data, of course.

            Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

            P Offline
            P Offline
            praveen pandey
            wrote on last edited by
            #5

            Thanks alot...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups