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. displaying images

displaying images

Scheduled Pinned Locked Moved C#
csharptutorial
6 Posts 4 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.
  • J Offline
    J Offline
    jananiSreedhar
    wrote on last edited by
    #1

    How to display images randomly from a file on click of a button in C#.net

    C 1 Reply Last reply
    0
    • J jananiSreedhar

      How to display images randomly from a file on click of a button in C#.net

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

      Well, you need to look at the Random class. Then you can use Directory.GetFiles to get a list of files to randomly select from.

      Christian Graus Driven to the arms of OSX by Vista.

      J realJSOPR 2 Replies Last reply
      0
      • C Christian Graus

        Well, you need to look at the Random class. Then you can use Directory.GetFiles to get a list of files to randomly select from.

        Christian Graus Driven to the arms of OSX by Vista.

        J Offline
        J Offline
        jananiSreedhar
        wrote on last edited by
        #3

        Thanks

        1 Reply Last reply
        0
        • C Christian Graus

          Well, you need to look at the Random class. Then you can use Directory.GetFiles to get a list of files to randomly select from.

          Christian Graus Driven to the arms of OSX by Vista.

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          You forgot to include ", and using google would probably have given you an answer a lot faster than waiting for someone here to try to figure out what you really want."

          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

          P 1 Reply Last reply
          0
          • realJSOPR realJSOP

            You forgot to include ", and using google would probably have given you an answer a lot faster than waiting for someone here to try to figure out what you really want."

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            P Offline
            P Offline
            praveenvkumarv
            wrote on last edited by
            #5

            using the timer control, u can do this. in the event of the timer , include some code. First, you need to add some images in the imagelist control. Than, in the timer event display a image from the imagelist use the break statement to break the loop . when ever the timer event occurs then the image changes . After the imageslist reaches the last index then make the control value as 0 to repeat the loop

            realJSOPR 1 Reply Last reply
            0
            • P praveenvkumarv

              using the timer control, u can do this. in the event of the timer , include some code. First, you need to add some images in the imagelist control. Than, in the timer event display a image from the imagelist use the break statement to break the loop . when ever the timer event occurs then the image changes . After the imageslist reaches the last index then make the control value as 0 to repeat the loop

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              WTF are you talking about?

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              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