Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to display Locfile() dialog with _screen=OFF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00437609
Message ID:
00437737
Vues:
19
>>>
>>>ok, almost got it.
>>>
>>>with thisform.olecontrol1
>>> .filename = 'whatever.exe'
>>> .defaultext = '.exe'
>>> .showopen()
>>>
>>> messagebox(.filename) &&gives me the return
>>>endwith
>>>
>>>However, the .defaultext property doesn't seem to work for me. The "files of type" drop down list in the dialog box is empty. I also tried .defaultext='exe' but got the same results.
>>
>>The filter property is what you're looking for here. Check the doc on that. It allows you to specify both the extension and description that appears.
>
>Thanks, that works. Now back to my original issue. Can I instantiate this control in a .prg (using createobject() or newobject()) and if so, which OCX is the commondialog in so I can reference that file when creating the object? This activeX control doesn't appear in the "ActiveX controls overview" secion in VFP help, which is the only way I know of to determine which OCX an ActiveX class belongs to.

You have to drop it on a form. While you can, in design mode, simply use CREATEOBJECT() and manipulate it programmatically, this will fail in production. It's a licensing issue. Just create a form class, and drop the control on that, then set your class library and issue CREATEOBJECT() for the form class.

As far as installation, as I recall, it's in the list that appears in the setup wizard. The file name is COMDLG32.OCX.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform