Answers for "c# picturebox image size"

C#
0

change picturebox image c#

pictureBox1.Image = Image.FromFile("../Pics/image1.jpg");
Posted by: Guest on November-25-2021
0

how to set picturebox width with form width in c#

private void Form1_Resize(object sender, System.EventArgs e)
{
   Control control = (Control)sender;


   double percentage = 0.7;    
   int width = control.Size.Width;
   //width = (int)Math.Round(test*perc); imagewidth 70% of form width
   int heigth = control.Size.Width;

   picturebox1.Size = new Size(width,height);  

}
Posted by: Guest on January-14-2021

C# Answers by Framework

Browse Popular Code Answers by Language