Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS Common Dialog - is there a way to return Path and lis
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00299346
Message ID:
00299857
Vues:
16
Hi George,

Now this code works perfect. Don't know why it didn't before.
Thanks a lot, George.


>
>I neglected to shorten the string in my original post. Here's the corrected version:
>oDialog = CREATEOBJECT('MSComDlg.CommonDialog')
>* Set the flags for Multi-Select/Explorer
>oDialog.MaxFileSize = 260
>oDialog.Flags = 0x200 + 0x80000
>oDialog.ShowOpen
>* Save the file name to a variable
>lcfilename = oDialog.FileName
>lnpt = AT(CHR(0), lcfilename)
>IF lnpt > 0
>  lcpath = LEFT(lcfilename, lnpt - 1)
>  ? lcpath
>  lcfilename = SUBSTR(lcfilename, lnpt + 1)
>  lnfiles = OCCURS(CHR(0), lcfilename) + 1
>  DIMENSION a_file[lnfiles]
>  lni = 0
>  DO WHILE NOT EMPTY(lcfilename)
>    lni = lni + 1
>    lnpt = AT(CHR(0), lcfilename)
>    IF lnpt > 0
>      lcname = LEFT(lcfilename, lnpt - 1)
>      lcfilename = SUBSTR(lcfilename, lnpt + 1)
>    ELSE
>      lcname = lcfilename
>      lcfilename = ""
>    ENDIF
>    a_file[lni] = lcname
>  ENDDO
>  lnlast = ALEN(a_file, 1)
>  FOR lni = 1 TO lnlast
>    ? a_file[lni]
>  NEXT
>ENDIF
>oDialog = NULL
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