Reputation: 345
hi to all I insert into Oracle database image file on Delphi(create table (id int,dir varchar2(200),image blob). Now I want to open directory(dir) of that file on dblick dbimage1 example: D:\image.bmp Thanks in advance
Upvotes: 0
Views: 2250
Reputation: 77667
uses ShellAPI;
...
// opens Windows Explorer with the file highlighted
ShellExecute(Handle,
'open',
'C:\Windows\explorer.exe',
'/start,"' + ImageFileName + '"',
nil,
SW_SHOWNORMAL);
// opens the default program associated with the type (extension) of the file,
// which in your case can very well be Windows Fax and Picture Viewer
ShellExecute(Handle,
'open',
nil,
'"' + ImageFileName + '"',
nil,
SW_SHOWNORMAL);
If ImageFileName
already contains "
, remove them in the code above.
Upvotes: 2
Reputation: 138970
You can use a TOpenPictureDialog to let the user select an image file.
Upvotes: 0