Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common dialog
Message
 
To
24/10/2002 15:41:01
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00715073
Message ID:
00715123
Views:
21
Additionally, you can find details in help file, like "C:\Program Files\Microsoft Visual Studio\MSDN98\98VSa\1033\CMDLG98.CHM".

>Hey Yuri,
>
>Thanks for the code. That's exactly what I was looking for!!! Good work.
>
>Mike.
>
>
>>Something like:
>>
>>do iCmDlg with "ShowPrinter"
>>
>>
>>Procedure iCmDlg
>>Parameter pShow
>>
>>local ;
>> loComDialog, ;
>> lcFileName
>>
>>loComDialog = createobject("mscomdlg.commondialog")
>>
>>do case
>>case pShow="ShowOpen" or pShow="ShowSave"
>> * Set filters
>> loComDialog.Filter = "All Files (*.*)|*.*|Text Files(*.txt)|*.txt|Batch Files (*.bat)|*.bat"
>> * Specify default filter
>> loComDialog.FilterIndex = 2
>> loComDialog.MaxFileSize=40
>> * Display the Open dialog box
>> loComDialog.ShowOpen()
>> * Get File Name
>> lcFileName = loComDialog.FileName
>>
>> Messagebox( lcFileName )
>>
>>case pShow="ShowPrinter"
>> ?iif(printstatus(), "OnLine","??Off-line")+" ; "+sys(13)
>> ?set("printer")
>>
>> loComDialog.CancelError = .f.
>> loComDialog.Copies=4
>> loComDialog.Orientation=2 &&Landscape
>>
>> loComDialog.Flags= 1+10+2*16+2*16^2 &&cdlPDCollate, enable Collate and;
>> &&print to file
>>
>> *----------------Number of Pages
>> loComDialog.Min=0
>> loComDialog.Max=5000
>> loComDialog.FromPage=2
>> loComDialog.ToPage=5
>> *--------------------
>>? loComDialog.hDC &&ReadOnly
>> loComDialog.ShowPrinter()
>>
>>case pShow="ShowColor"
>> loComDialog.ShowColor()
>>
>>endcase
>>
>>Regards
>>
>>>Hi All,
>>>
>>>I have in the past used the MSCommon Dialog control in my VFP forms and it works very well. Now I want to use it without placing it on a form. How do I apply the VFP command "CREATEOBJECT()" to make an open file dialog object?
>>>
>>>TIA
>>>
>>>Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform