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. Can't see images when run the application

Can't see images when run the application

Scheduled Pinned Locked Moved Visual Basic
debugging
3 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.
  • N Offline
    N Offline
    Neo_Ali
    wrote on last edited by
    #1

    i set a picturebox control on my form and i load an image to it from the image property , i also set the Visible property to "True" but when i debug the application , i can't see the image in the run mode, only the border of the picturebox. The extention of the image is "JPG" and "Gif" , and i can open those pictuers easly as i'm using windows XP, but i still can't see the picture on the run mode. is there a code i should use to load the image in the picturebox at run time , and if yes where to place this code, in the main code body of the form or behind the picturebox itself. please advise and thank you again i could found a possible code which is < Dim img As Image img = picturebox1.image > but when i use it i have an errore which state that Image is not a type. please advise and thank you.:) Ali

    K 1 Reply Last reply
    0
    • N Neo_Ali

      i set a picturebox control on my form and i load an image to it from the image property , i also set the Visible property to "True" but when i debug the application , i can't see the image in the run mode, only the border of the picturebox. The extention of the image is "JPG" and "Gif" , and i can open those pictuers easly as i'm using windows XP, but i still can't see the picture on the run mode. is there a code i should use to load the image in the picturebox at run time , and if yes where to place this code, in the main code body of the form or behind the picturebox itself. please advise and thank you again i could found a possible code which is < Dim img As Image img = picturebox1.image > but when i use it i have an errore which state that Image is not a type. please advise and thank you.:) Ali

      K Offline
      K Offline
      kumarprabhakar74
      wrote on last edited by
      #2

      You can use given command to load picture at run time Dim bmp As New System.Drawing.Bitmap(FileName) PictureBox1.Image = bmp Thanks & Regards Kumar Prabhakar

      abc

      N 1 Reply Last reply
      0
      • K kumarprabhakar74

        You can use given command to load picture at run time Dim bmp As New System.Drawing.Bitmap(FileName) PictureBox1.Image = bmp Thanks & Regards Kumar Prabhakar

        abc

        N Offline
        N Offline
        Neo_Ali
        wrote on last edited by
        #3

        Thank you so much, this was really helpful and solve the problem but the point now is , when i place the path for the image in the code. i can't run this application on any ther machine also when adding the setup wizard to the solution i added the image within this wizard. but when i tried to run the application on another machine after installing it, the application didn't work, so how i can over come this problem, please Advise and thanks for your help Ali

        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