Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the starting directory of getfile()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00410663
Message ID:
00410676
Views:
18
>>Basically, you can use SET DEFAULT TO (< path >) to control the initial directory GETFILE() displays. Of course, this involves getting the current default, changing it, then restoring it. It's probably easier to use the Common Dialogs ActiveX control, which has an InitDir property that it will use. IMO, it also gives you more control over the dialog than either GETFILE() or PUTFILE().
>
>This sounds like what I need because I don't really want to change my active directory. I've never used the Common Dialogs activeX control. Where would I find this and is there any documentation available? Thanks again.

The Common Dialogs control ships with VFP. From the Tools/Options dialog select the Controls tab. When the page appears, make sure the option button with the ActiveX controls is selected. From the list, make sure the check box next to Common Dialogs Control is checked. If not, check it and click the set as default command button. When you select the Class Library from the context menu on the controls toolbar, you can select ActiveX, and it will appear on the toolbar. There are tooltips to help you identify the controls. Click the control and drop it on a form. You can then select help from the context menu for the control.

The control (relatively speaking) has been around for a long time (I first encountered it back in VB 3). It's stable and works well in VFP.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform