Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need multi-select File Open dialogue
Message
De
14/05/2007 11:36:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01222666
Message ID:
01225273
Vues:
40
Thanks for the suggestions. But the original code is not mine. To be honest, I forget where I got the routine. I will look at your suggestion and update the code.

>If you are going to make it generally available, I did change a couple of minor things that you might want to consider:
>- Make the filename buffer sizer larger than 1023. I used 4096.
>- I changed the 2nd parameter (apparently unused in your code) to be the initial path where the file-open begins
>- Noticed your creative (and undocumented) use of tildes to separate the items in the file filter couplets. So, for example, I used:
>
>"Any JPeg/GIF/BMP/TIFF/PNG/Dicom~*.JPG;*.gif;*.bmp;*.dcm;*.png;*.tif*"
>
>Also realized that a semicolon is used to separate the file masks, which is consistent with the API specs (but is different than the OCX specs; I think it uses commas).
>- It looks also like the params tcOpenButtonCaption and tnButtonType were not used by your code.
>- I changed hwndOwner = 0 to hwndOwner = _vfp.HWnd so that the dialogue would open within the VFP main window instead of (in my experience) the L upper corner of the display.
>- I found that for some odd reason, if the file-open dialogue opens in a location where it happens to cover the mouse cursor, the cursor remains invisible until you move it outside the dialogue and back in. Since the file-open in my code is invoked via a push-button click, I found I can circumvent this odd behavior by including this code immediately before the call to mGetFile, although I am really clueless as to why it works:
>WITH _screen.ActiveForm.activecontrol
>  MOUSE AT .top,.left+.width/2 PIXELS WINDOW (_screen.ActiveForm.name)
>ENDWITH
>INKEY(0.1)
>
>
>Regardless of these tweaks, your code works great. Just what I needed.
>
>
>
>>You're welcome.
>>
>>>Beautiful! Thanks Greg. That's really helpful. I've already put it to use. Completely circumvents the need for the COMDLG32.OCX control, which on many systems (I have found) is not installed.
>>>
>>>>>Some clients have asked if we can provide a file-open dialogue within our VFP app that lets them multi-select files. This has to do with adding images to a database, so there is good reason to ask for it. We are using VFP8, and to the best of my knowledge, it does not support this feature. With GetFile(), you can only select a single file. We support Copy/Paste from Windows explorer and Drag-Drop from Windows explorer, but they still want a multi-select file-open dialogue.
>>>>>
>>>>>Any recommendations?
>>>>>
>>>>>Thanks very much.
>>>>
>>>>Sorry I'm late for this party. I have code to make the standard Open File Dialog multi-select. http://www.GLRsoftware.com/download/download.asp?file=mGetFile.zip.
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform