Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error in MsComDlg.CommonDialog
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01105942
Message ID:
01105982
Vues:
23
This message has been marked as the solution to the initial question of the thread.
Try
* Set the flags for Multi-Select/Explorer
.MaxFileSize = 1640 && 820


>Hi all,
>
>I am using MsComDlg.CommonDialog to allow the users select either single or multiple files to open. I have been using this code without incident until today, when I was alerted to the following error after four (4) files were selected:
>
>
>OLE IDispatch exception code 0 from CommonDialog:
>The FileName buffer is too small to store the selected file name(s). (Increase MaxFileSize)
>
>
>The code that I am using is:
>
>
>oDlg = createobject("GetFileEx")
>oDlg.getfile()
>release oDlg
>return
>****************************************************************************************
>*	define class GetFileEx
>****************************************************************************************
>define class GetFileEx as form
>	left = 200   && Set Dialog Position by positioning the form
>	top = 100    && Set Dialog Position
>	name = "GetFIleEx"
>	docreate = .t.
>	visible = .f.
>	add object oCDC as olecontrol with ;
>		oleclass = "MsComDlg.CommonDialog"
>
>	procedure getfile
>	with thisform.oCDC
>		.initDir=lcCurrentRawDataDir
>		.dialogtitle='Select raw data files'
>		.flags="&H00080204" && flags set to allow multiselect and hide read only checkbox
>		.ShowOpen()
>	endwith
>	endproc
>enddefine
>
>
>The error occurs on the ShowOpen() call. Any suggestions on how correct the error?
>TIA
>Vince
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