Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Common dialog
Message
De
24/10/2002 15:41:01
Mike Sue-Ping
Cambridge, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00715073
Message ID:
00715099
Vues:
25
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform