try
    {
        string path = Application.StartupPath + @"\IMAGE\";
        if (!System.IO.Directory.Exists(path))
            System.IO.Directory.CreateDirectory(Application.StartupPath + @"\IMAGE\");
        string filename = path + @"\" + openFileDialog1.SafeFileName;
        pictureBox1.Image.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg);
        System.IO.File.Move(path + @"\" + openFileDialog1.SafeFileName, path + @"\" + textBox1.Text + ".jpg");
    }
    catch (Exception ex)
    {
       MessageBox.Show("Failed To Save" + ex.Message);

i made a registration form.there is a picture box to insert picture who r registering.And upper code is the path where this picture is saved.Now i made a form which will show the profile of that registered parson after login.in the profile form there is also a picture box.after login the exact photo of that person will come in that box in the time of load of that profile form.But i do not khow the code.please let me know the code,as soon as possible.....

If I understood you, you want to load a picture into a pictureBox?
And the right one? Does the image has a name?

yes,as the person regestered,automatically the photo of his saved as his name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.