anil john

anil john

  • NA
  • 156
  • 210.5k

picture size

Oct 5 2012 12:24 AM

form2:
 public void setFilename(string sFile)
        {
            pictureBox1.Image = Image.FromFile(sFile);
        }


form 1:
  private void button2_Click(object sender, EventArgs e)
        {
          
            frmPreview frmPreviewObj = new frmPreview();
            frmPreviewObj.setFilename(fname);
            //pictureBox1 .Height =fname
            frmPreviewObj.Show();
            frmPreviewObj.Location = new Point(0,50);
        }
here am showing the picture in form2 from button click in form1, i want to chage my second form's form or picture boxes size to the size of the image , how can i do this?


Answers (1)