0

I've added images to my Visual Studio application Windows form and sized them to what I wanted for my computer. I have a tab inside the form and the images are inside the tab. However, when I change the computer I am using the application on, the images no longer fit in the tab (they get resized and so part of them is cutoff).

I couldn't find any relevant code that would set the image sizing so I tried changing the properties. I've tried setting the maximum size under Properties but that doesn't seem to be working.

The images are still getting resized and cutoff depending on different computers and I can't figure out how to fix that. Why are the images resizing when they work perfectly on my computer and how do I fix the image dimensions so they don't change between computers because I cannot predict what will happen in all other laptops. Help would be much appreciated, thank you.

arya1021
  • 7
  • 4
  • Use a PictureBox with `SizeMode = Zoom` and anchor/dock it. You should specify the UI Framework you're using (WinForms, WPF etc.). If it's WinForms, you should also enable DPI Awareness: [How to configure an app to run correctly on a machine with a high DPI setting](https://stackoverflow.com/a/13228495/7444103) – Jimi Aug 01 '19 at 13:08

1 Answers1

0

Change the Form's AutoScaleMode this can resize objects inside your window differently depending on the users DPI settings. Try each one to see what works best for you. AutoScaleMode reference