Solved

TOpenDialog file woes.....

Posted on 1998-04-08
7
289 Views
Last Modified: 2010-05-18
I've been using TOpenDialog for selecting multiple files. Although the selected files are stored in the TString property "Files", I can't seem to access all the lines of this object. It will contain the first 17 files and a truncated copy of the 18th line. Is this a known bug? Is there are patch or a workaround?
0
Comment
Question by:RogerMadore
  • 4
  • 3
7 Comments
 
LVL 5

Expert Comment

by:ronit051397
Comment Utility
Can you show some code?
0
 

Author Comment

by:RogerMadore
Comment Utility
  If OpenDialog.Files.Count>0 Then
      Begin
      For X := 0 To OpenDialog.Files.Count-1 Do
         Begin
         If FileExists(OpenDialog.Files[X]) Then
            Begin
            mtrLoadFiles(OpenDialog.Files[X]);
            Memo.Lines.Add(OpenDialog.Files[X]+' added.');
            End;
         End;

0
 
LVL 5

Accepted Solution

by:
ronit051397 earned 100 total points
Comment Utility
if OpenDialog1.Execute then
  Memo1.Lines.Assign(OpenDialog1.Files);
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:RogerMadore
Comment Utility
Thanks for the answer, but unfortunately it doesn't work. If you look at the source of Dialog.Pas, you'll see a buffer being used. I tried changing this buffer size and creating my own component, but it still didn't work.... perhaps I overlooked something. Thanks for any other input.
function TOpenDialog.DoExecute(Func: Pointer): Bool;
const
  MultiSelectBufferSize = 8192;
  ...
begin
   ...
    if ofAllowMultiSelect in FOptions then
      nMaxFile := MultiSelectBufferSize else
      nMaxFile := MAX_PATH;
   ...
0
 
LVL 5

Expert Comment

by:ronit051397
Comment Utility
I have 36 selected 36 files and it worked fine. What version of Delphi do you have?
0
 
LVL 5

Expert Comment

by:ronit051397
Comment Utility
I am going to rest in the carribeans, so you better reject my answer and let others to answer.

Bye
Ronit
0
 

Author Comment

by:RogerMadore
Comment Utility
I have Delphi 3 Client/Server (Build 5.53)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now