Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in MsComDlg.CommonDialog
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Error in MsComDlg.CommonDialog
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01105942
Message ID:
01105942
Views:
164
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
Next
Reply
Map
View

Click here to load this message in the networking platform