anil john

anil john

  • NA
  • 156
  • 210.5k

picture preview

Sep 28 2012 1:37 AM
i am getting an error on executing the below code,plz help me to rectify this

error:Cannot implicitly convert type string to system.drawing.image

private void button2_Click(object sender, EventArgs e)
        {
          
            frmPreview frmPreviewObj = new frmPreview();
           
            frmPreviewObj.Show();
            //Bitmap image = new Bitmap(fname, true);
            Image img = fname;
            frmPreviewObj.pictureBox1.Image = img;
        }

Answers (4)