Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternative to GetFile() that allows multiselect?
Message
De
05/12/2013 09:25:29
 
 
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:
01589335
Vues:
77
No, it does not seem so. Like I said, the funny thing is that other code on the same PC still runs - it's not like I deleted an .ocx or something.

Doing some searching on this, this ComDlg32.ocx seems to be an old VBA control that could be used (perhaps not licenses properly - who knows where I got it). I think I should just switch to a built in Windows function - does anyone know a Windows function and more importantly, where I can get good documentation on how to use it?

Thanks,

Albert

>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform