Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only