using (SqlConnection myDatabaseConnection = new SqlConnection(myConnectionString.ConnectionString))
{
myDatabaseConnection.Open();
using (SqlCommand SqlComma
You can set picturebox's SizeMode
property to PictureSizeMode.Zoom
, this will increase the size of smaller images or decrease the size of larger images to fill the PictureBox
Use the following lines of codes and you will find the solution...
pictureBox1.ImageLocation = @"C:\Users\Desktop\mypicture.jpg";
pictureBox1.SizeMode =PictureBoxSizeMode.StretchImage;
Imam Mahdi aj
You can use the properties section
You could try changing the: SizeMode property of the PictureBox.
You could also set your image as the BackGroundImage of the PictureBox and try changing the BackGroundImageLayout to the correct mode.
Have a look at the sizemode property of the picturebox.
pictureBox1.SizeMode =PictureBoxSizeMode.StretchImage;
You could use the SizeMode property of the PictureBox Control and set it to Center. This will match the center of your image to the center of your picture box.
pictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;
Hope it could help.