Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PUTFILE case
Message
 
 
To
03/01/2011 06:14:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01494416
Message ID:
01494420
Views:
74
You can use Windows common controls
oDlg = Createobject("GetFileEx")
oDlg.GetFile()
? oDlg.oCDC.OBJECT.FileName
RETURN

DEFINE CLASS GetFileEx AS form
	Left = 100   && 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()
		Thisform.oCDC.ShowSave()
	ENDPROC 	
ENDDEFINE
Keep in mind that you'll have to either drop control on a form or subclass it in a visual class. See BUG: License Error with ActiveX Control Added at Run-Time mskb #192693.


>PUTFILE() always returns the path + filename in uppercase. Is there a way to get the case the user actually used for the file name?
>
>TIA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform