I have a small dialog window as an MDI child to select an image for a picture box in the parent form. The requirement is to display the selected image in the picture box immidiately after I select and hit OK from the child so the user can see the image before saving.
I am able to load the image file as a binary data file and also save it to the database but it doesnt display the picture right away in the picture box. Does any one know how that could be achieved, I have tried something like this but its not working:
From the child:
parentForm obj=new parentForm();
obj.LoadPicture(picturePath);
In the parent:
private void LoadPicture(string path)
{
pictureBox.Load(path);
}
I think I need to use events but I am not good at it.
Please help.
Thanks