×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Selecting Multiple Win10 Image Files

Selecting Multiple Win10 Image Files

Selecting Multiple Win10 Image Files

(OP)
Hello. I currently have an app which allows the user to select an image file from the MS file system ... then I store the filename and a link to the file in the app database.

I am using Delphi 6 (BDS2006) and would like to know how I can detect if several image files are selected from the MS file system and process the multiple file selections in order to enter the filename and like for all selected files into the app database.

Thanks in Advance,

Patrick (Delphi user since the Polaris Beta version of Delphi.

RE: Selecting Multiple Win10 Image Files

What are you using to select the image files currently? What have you tried? If you are using the standard Open dialogs, you should be able to set MultiSelect to on and then get the list of files selected.

Mirtheil
http://www.mirtheil.com

RE: Selecting Multiple Win10 Image Files

(OP)
Mirtheil,

Hello. Yes, I am using the OpenDlg file system popup dialog box to select the desired file. To improve the app, I need to allow the user(s) to select multiple files at one time.

Patrick

RE: Selecting Multiple Win10 Image Files

(OP)
Mirtheil,

After posting the above reply, I opened the app and clicked on the "select file" option in the app. When the dialog displayed, it showed the list of available files, but I did not see a MultiSelect option.

Is the solution a variation of for x := 0 the selected - 1 do? ... and in the loop capture the file name and location for storing in the database?

Thanks, Patrick

RE: Selecting Multiple Win10 Image Files

The MultiSelect option is in Options and is called 'ofAllowMultiSelect'. Here's a very simple example that displays the OpenDialog, allows multiple selection of files and then adds the list of files to a Memo. The Files object of the OpenDialog is a StringList and can be treated as such.

Example:

CODE

with OpenDialog1 do begin
    Options := [ofALlowMultiSelect];
    if (Execute()) then begin
      Memo1.Lines := Files;
    end;
  end; 

This code works in both Delphi 5 and Delphi 10.3 (only versions I have access to).

Mirtheil
http://www.mirtheil.com

RE: Selecting Multiple Win10 Image Files

(OP)
many thanks!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close