adl
adl

Reputation: 2035

Images in picture box are not shown properly on different PCs - Windows Forms C#

I created a form with an image inside a picture box.

When I tried to run my application on another pc the image is cut on it's right and bottom. It happens in several different images and in several different pcs.

here how it looks on my pc: My PC

and in my friend's pc:

My Friend's PC

How do I fix it?

EDIT:

here is the code in the designed that defines the picture box:

this.playPictureBox.Image = global::WorkTimer.Properties.Resources.play;
this.playPictureBox.Location = new System.Drawing.Point(86, 40);
this.playPictureBox.Name = "playPictureBox";
this.playPictureBox.Size = new System.Drawing.Size(96, 95);
this.playPictureBox.TabIndex = 24;
this.playPictureBox.TabStop = false;
this.playPictureBox.Click += new System.EventHandler(this.playPictureBox_Click);

thanks

Upvotes: 0

Views: 1249

Answers (1)

Stefan P.
Stefan P.

Reputation: 9519

Set the PictureBox.SizeMode to AutoSize

Upvotes: 2

Related Questions