Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen=off, Getfile()
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00745697
Message ID:
00745703
Views:
40
This message has been marked as the solution to the initial question of the thread.
You can try Common Dialog Control.
oDlg = Createobject("GetFileEx")
? oDlg.GetFile()

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.
	cFileSelected = ""
	lUserCancel = .F.
	
	ADD OBJECT oCDC AS OleControl WITH ;
		OleClass = "MsComDlg.CommonDialog"

	PROCEDURE oCDC.Init
		This.CancelError = .T. 	
	ENDPROC 	

	PROCEDURE Error
		LPARAMETERS nError, cMethod, nLine
		IF nError = 1429
			This.lUserCancel = .T.
		ENDIF
	ENDPROC 

	PROCEDURE GetFile(tnInitColor)
		Thisform.oCDC.ShowOpen()
		IF This.lUserCancel
			This.cFileSelected = ""
		ELSE	
			This.cFileSelected = Thisform.oCDC.FileName
		ENDIF
		RETURN This.cFileSelected 				
	ENDPROC 	
ENDDEFINE
>Hi,
>
>In a very small executable I want to let the user choose an app. Then the app, containing a form, will be executed. The app is chosen with the help of GETFILE(). In that phase I don't want the main vfp-window, so I put SCREEN=OFF in the config.fpw. However, this also prevents the visibility of Getfile().
>
>Any other solution?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform