Page 1 of 1

is it possible to open a dialogbox to choose an image file

Posted: Thu Dec 21, 2017 4:33 pm
by alepage
Hi,

Is it possible by an event to present a form that ask the end user to choose an image file ?

My second thinking is this one. It is possible to present a image on a form, and to choose an image with the "image" property. Is it possible to show the same dialogbox by an event ?

Thanks in advance.
Arnaud

Re: is it possible to open a dialogbox to choose an image fi

Posted: Tue Dec 26, 2017 6:43 am
by Alex K.
Hello,

You can use the following code:

Code: Select all

OpenFileDialog openFileDialog1 = new OpenFileDialog();
if(openFileDialog1.ShowDialog() == DialogResult.OK)
{
	Image1.Image = Image.FromFile(openFileDialog1.FileName);
}
this.Render();
Thank you.

Re: is it possible to open a dialogbox to choose an image fi

Posted: Tue Jan 09, 2018 8:31 am
by alepage
Hi Alex,

Happy New Year to the support team of Stimulsoft !

Thanks for your solution. It works very well !
Arnaud

Re: is it possible to open a dialogbox to choose an image fi

Posted: Tue Jan 09, 2018 10:44 am
by Alex K.
Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.