Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I create a 2.6 program without screen I/O?
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00215448
Message ID:
00215676
Views:
26
>I've got a program (in 2.6a) that reads a file, processes the contents, creates a file with the results, and quits.
>
>It works fine as is...but I have no need for any screen I/O.
>
>Is there anyway to have the program do it's stuff without it first creating a "window" to run in? This program may need to run a hundred times a day and I'd rather it not be opening and closing a useless window all day long...that's gotta slow it down some too...
>
>Any ideas?
>
Hi Rick,

Craig's right about not being able to completely hide the window. However, you might want to consider the following. It's close but not completely what you're after.

First, the shortcut should be modified so start the application minimized. You'll next need the following code:
SET LIBRARY TO FOXTOOLS ADDITIVE
* Get the window handle from Foxtools
m.hwnd = MainhWnd()
* Register the ShowWindow API call
m.showwind = RegFN("ShowWindow", "II", "I")
* Hide the window
= CallFN(m.showwind, m.hwnd, 0)
This will hide the window completely. It will not appear on the task bar. Since the application is minimized to start, there will be no indication of the FPW window. I've tested this myself on FPW and even the splash screen doesn't appear. How it works in production is another matter, however.

hth,
George

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

Click here to load this message in the networking platform