I use OpenImageEndialog from Imageen to browse for a image file. this questioncould also be adapted for any open opendialog file.
How can i find out if the user has press the ok key to load an image or cancel?
Here's the code:
OpenImageEnDialog.InitialDir := ParamStr(0);
if OpenImageEnDialog.Execute then
ImageEnView3.IO.LoadFromFile(OpenImageEnDialog.filename);
Right now, to check if an image has really been loaded, I wrote:
if OpenImageEnDialog.filename<>'' then showmessage('Canceled');
Is there a better way?
Thanks.
How can i find out if the user has press the ok key to load an image or cancel?
Here's the code:
OpenImageEnDialog.InitialDir := ParamStr(0);
if OpenImageEnDialog.Execute then
ImageEnView3.IO.LoadFromFile(OpenImageEnDialog.filename);
Right now, to check if an image has really been loaded, I wrote:
if OpenImageEnDialog.filename<>'' then showmessage('Canceled');
Is there a better way?
Thanks.