Display resolution of PictureBox

  • Thread starter Thread starter Steve McLellan
  • Start date Start date
S

Steve McLellan

Hi,

Is there a quick way of telling PitcureBox to display its image at actual
pixel resolution, or do I need to write a custom class to do it? I'd like
the image to display at the same size as other apps display it.

Thanks,

Steve
 
Set the picturebox's SizeMode property to any value other than Stretch. This will ensure that the picturebox shows the picture in the actual original resolution

HTH
fbhcah
 
Hi,

Cheers for the response. I've done this, but what puzzles me is that looking
at the same image in a .NET app and the Windows previewer you see completely
different results. The image in question has a horizontal and vertical
resolution of 72dpi, while my screen's probably at 96. Presumably the
DrawImage function PictureBox uses is doing something weird? I know there
are about 500 versions of DrawImage, one of which allows you to scale the
picture. It seems weird that the image is being upscaled by default - it's
appearing much larger than it's 1024 X 1024 size.

Thanks,

Steve

fbhcah said:
Set the picturebox's SizeMode property to any value other than Stretch.
This will ensure that the picturebox shows the picture in the actual
original resolution.
 
Back
Top