i place two forms one contain 2 picturebox and 2 button and 2nd form contain 2 picturebox and one button
when insert image in 1st form it automaticaly load on 2nd form when 2nd form load.
plzzzzzzzzzzzzzz help me to do this

when you show the 2nd form pass the path of loaded image in 2nd form and in form2_load event load that image in picturebox


//code in form 1
 String strFileName = "";
        public Form1()

        private void button1_Click(object sender, EventArgs e)
            openFileDialog1.Filter = "Image FIles (*.jpg)|*.jpg|All files (*.*)|*.*";
            //openFileDialog1.InitialDirectory = @"d:/";
            openFileDialog1.Title = "Select an image file"; 
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
                strFileName = openFileDialog1.FileName;
            if (strFileName != "")
                pictureBox1.Image = Image.FromFile(strFileName);

        private void button2_Click(object sender, EventArgs e)
            Form2 obj = new Form2(strFileName);

//code in form 2

 String PathOfImage = "";
        public Form2(String Path)
            PathOfImage = Path;

        private void Form2_Load(object sender, EventArgs e)
            pictureBox1.Image = Image.FromFile(@PathOfImage);

Edited 5 Years Ago by abelLazm: n/a

Godd Logic
Continous effort.
This article has been dead for over six months. Start a new discussion instead.