PictureBox size to Image size RRS feed

  • Question


    Hey. I have a program I made in which you can open up images. What I want to do is have the picturebox that the image opens in change its size to the size of the image. (So if the image size is (300, 250) then the picturebox size changes to (300, 250)  )


    I'm guessing you do this by somehow having the program get the image size, and then apply that size to the picturebox's size, but I'm unsure as to how I would go around doing this. Any help would be greatly appreciated.



    Monday, October 22, 2007 6:39 PM


  • PictureBox1.Size = PictureBox1.Image.Size

    Monday, October 22, 2007 6:45 PM