My scenario:
I am developing a monitoring app (VFP 9 on Windows 7 64 bit) to run in the background on several hundred computers. All it does is periodically check internet connectivity by pinging some preconfigured IP addresses. If need be, it resets the VPN connection and re-establishes connectivity.
It needs to stay hidden from the screen and the taskbar unless manually accessed. So what I do is after it starts, it waits 10 seconds to do its check then uses a ThisForm.Hide() to hide itself. If someone needs to access the app, they can run the executable again to 'unhide' it. I have been using the usual API calls to prevent multiple instances of an app in order to just show it:
BringWindowToTop(lnHWND)
ShowWindow(lnHWND, SW_SHOWNORMAL)
SetForegroundWindow(lnHWND)
The problem is, when the app 'shows' again, I see a flicker of the original screen design, then just a plain white screen. I have added code to the Activate, Show, and GotFocus methods to try and redraw the form, but none of those seem to fire when the API calls are used.
Has anyone run into this?
-Dave Summers-
Even more Fox stuff at:
I am developing a monitoring app (VFP 9 on Windows 7 64 bit) to run in the background on several hundred computers. All it does is periodically check internet connectivity by pinging some preconfigured IP addresses. If need be, it resets the VPN connection and re-establishes connectivity.
It needs to stay hidden from the screen and the taskbar unless manually accessed. So what I do is after it starts, it waits 10 seconds to do its check then uses a ThisForm.Hide() to hide itself. If someone needs to access the app, they can run the executable again to 'unhide' it. I have been using the usual API calls to prevent multiple instances of an app in order to just show it:
BringWindowToTop(lnHWND)
ShowWindow(lnHWND, SW_SHOWNORMAL)
SetForegroundWindow(lnHWND)
The problem is, when the app 'shows' again, I see a flicker of the original screen design, then just a plain white screen. I have added code to the Activate, Show, and GotFocus methods to try and redraw the form, but none of those seem to fire when the API calls are used.
Has anyone run into this?
-Dave Summers-
Even more Fox stuff at: