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. Visual Basic
  4. Changing the picture in a picture box at runtime

Changing the picture in a picture box at runtime

Scheduled Pinned Locked Moved Visual Basic
question
3 Posts 3 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.
  • T Offline
    T Offline
    Tantalus_
    wrote on last edited by
    #1

    How could I do this? I have maybe 16 different pictures that could be displayed in a picture box depending on certain things, and this picture can change at runtime.

    L J 2 Replies Last reply
    0
    • T Tantalus_

      How could I do this? I have maybe 16 different pictures that could be displayed in a picture box depending on certain things, and this picture can change at runtime.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The picture in the picture box needs to change at runtime.

      1 Reply Last reply
      0
      • T Tantalus_

        How could I do this? I have maybe 16 different pictures that could be displayed in a picture box depending on certain things, and this picture can change at runtime.

        J Offline
        J Offline
        Jeremy Falcon
        wrote on last edited by
        #3

        ' set the image
        Picture1.Picture = LoadPicture("C:\Path\To\pic.bmp")
        ' clear the image
        Picture1.Picture = LoadPicture()

        You could also use an image list as well. Jeremy L. Falcon Homepage : Sonork = 100.16311
        "But everybody darlin' sometimes bites the hand that feeds." "Remember in this game we call life that no one said it's fair." "Just because you're winnin' don't mean you're the lucky ones." Song: Breakdown - Album: Use Your Illusion II - Artist: Guns N' Roses

        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