Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to GetFile() that allows multiselect?
Message
 
 
À
04/12/2013 15:57:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01589308
Message ID:
01589310
Vues:
100
Do you have a VCX library called oleCommonDialogs.vcx ?



>Hi all,
>
>Is there an alternative to GetFile() where the user can multi-select a bunc h of files? In some old code I used comdlg32.ocx - and it is working (on the same PC no less) but cannot get the code to work on the new machine.
>
>First - if you have an alternative, that would be great.
>
>Secondly, if you don't, anyone have a clue why this code is failing me when placed into a new project?
>
>I get the error "class definition OLECOMMONDIALOGS is not found". I thought it was supposed to be in ComDlg32.ocx - maybe I am even wrong on this?
>
>>>>>>>>>>>>>>>>>>>>>>>>>
>
>WITH THISFORM
>
>* if no .ioGetFilesDialog property yet, need to create one; I tried to do this via defining a form property
>* .ioGetFilesDialog and then using CREATEOBJECT() to fill it with an object but this does not work with OLE controls
>* - they have to be dropped on the form during design time or added via .AddObject() at run time
>
>IF NOT PEMSTATUS(THISFORM,"ioGetFilesDialog",5)
> .NewObject("ioGetFilesDialog","oleCommonDialogs")
>ENDIF
>
>WITH .ioGetFilesDialog
>
>* override the dialog title
>STORE "Select files to to process" TO .DialogTitle
>
>* set the default directory to the current directory
>STORE SYS(5) + CURDIR() TO .InitDir
>
>* fire the getfiles dialog
>.GetFiles()
>
>* if user picked any files, process them; if no files, just return as we will not alert them if they choose Cancel
>IF .inFileCount = 0
> RETURN
>ENDIF
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform