0
 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.....

Edited by pyTony: fixed formatting

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by smartjugal
0

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

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.