MelissaEvans
Programmer
Something's goofy with my computer, and whenever I alter the size of an Image control (with the stretch property set to true), it disappears. We've come to the realization that it's some obscure oddity on my machine only. This wouldn't bother us too much, except we fear that our customers will have the same oddity, so we've changed to a PictureBox control. I found some code that will "stretch" the picture to the size of the control (since it doesn't have a stretch property) like this:
Unfortunately, this doesn't seem to resize the picture to the PictureBox control.
I noticed in the language reference, it says:
PaintPicture Method: Draws the contents of a graphics file (.bmp, .wmf, .emf, .ico, or .dib) on a Form, PictureBox...
My files are .jpg's... anyone know of another solution?
This is getting irritating.... *sigh*
~Melissa
Code:
picture1.PaintPicture picture1.Picture, 0, 0, picture1.ScaleWidth, picture1.ScaleHeight
Unfortunately, this doesn't seem to resize the picture to the PictureBox control.
I noticed in the language reference, it says:
PaintPicture Method: Draws the contents of a graphics file (.bmp, .wmf, .emf, .ico, or .dib) on a Form, PictureBox...
My files are .jpg's... anyone know of another solution?
This is getting irritating.... *sigh*
~Melissa