Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to display Locfile() dialog with _screen=OFF
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00437609
Message ID:
00437619
Views:
15
>I have an executable that runs with screen=off (set in config.fpw). There aren't any forms in the program. My MESSAGEBOXES display with the screen off, however if my code hits a LOCFILE() it doesn't show the file selection window and the program hangs. I can set _screen.visible = .t. right before the locfile() and I can then see the Locfile() dialog. Then I can set _screen.visible = .F. immediately thereafter. However, this looks kind of cheesy to me. I'd rather keep the VFP screen hidden the entire time. Getfile() responds the same way. Any quick and easy way around this?

Jim,

Sometime in the past, there was a discussion trying to figure out why this occurs. We surmized (a SWAG to be sure) that the cause was the dialog was inheriting the visibility status of its parent window, in this case the _SCREEN. The Common Dialog ActiveX control, which calls the same DLL that LOCFILE(), GETFILE(), and PUTFILE() do, doesn't suffer from this problem. In this case, you're going to have to either roll your own LOCFILE() using the common dialogs, or be satisfied with the "cheesy" solution.
George

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

Click here to load this message in the networking platform