Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common dialog
Message
From
24/10/2002 15:55:58
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00715073
Message ID:
00715111
Views:
36
Sergey,

Your example works nicely. Now do you know if and how I can set the flags to have the user select a folder/directory rather than a file(s)?

Thans again for all your help.

Mike.


>Try
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.
>	ADD OBJECT oCDC AS OleControl WITH ;
>		OleClass = "MsComDlg.CommonDialog"
>
>	PROCEDURE GetFile(tnInitColor)
>                LOCAL lnColor
>		Thisform.oCDC.ShowOpen()
>	ENDPROC 	
>ENDDEFINE	
>
>>Thanks for the lead Sergey. I haven't tried it yet but I did try the following:
>>
>>oDialog = CREATEOBJECT("MsComDlg.CommonDialog")
>>oDialog.flags = "&H80806"
>>oDialog.dialogtitle = "This is a test"
>>oDialog.showsave
>>
>>The last line produced an error as follows:
>>
>>"Error: 1429 OLE IDispatch exception code 0 from CommonDialog. The common dialog function failed during initialization. This error often occurs when insufficient memory is available...in line 0".
>>
>>Do you have any idea what I did wrong?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform