Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
How did you "tried setting the DefaultExt"?
Will this work for you?
o = CreateObject("MSComDlg.CommonDialog")
o.Filter = "All Files (*.*)|*.*|Text Files(*.txt)|*.txt|Batch Files (*.bat)|*.bat"
o.FilterIndex = 2
o.MaxFileSize=40 && you must set this in your code anyway
o.ShowOpen
>Hello.
>
>I am having problems using the following commands with VFP7SP1 under NT4:
>
>o = CreateObject("MSComDlg.CommonDialog")
>o.ShowOpen
>
>The second command fails with the following message:
>
>'OLE IDispatch exception code 0 from CommonDialog. The common dialog function failed during initialization...'
>
>I've tried setting the DefaultExt, Flags, etc. properties and nothing seems to help. What am I doing wrong?
>
>FYI, o.ShowPrinter, o.ShowFont and o.ShowColor all work correctly.
>
>TIA,
>
>Mike
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement