4
Reply

picture preview

anil john

anil john

11 years ago
3.2k
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)