Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I want to close a VFP app when it loses focus, but...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00421030
Message ID:
00421469
Views:
18
>>nothing I thought would work did. The ThisForm.LostFocus() event doesn't fire when the user changes to another application, only when they change to another form within a vfp app. ThisForm.DeActivate() works the same way. I couldn't find any events at the _VFP level that would do this. I'm not sure a Windows API call would do it either, since VFP doesn't appear to be able to sense it.
>>
>>Foxheads, how are you doing this?
>
>Jerry,
>
>Let me ask you why the heck you'd want to do this in the first place? You are saying that just because I want to switch over and check my email or work on a spreadsheet that the VFP app I'm using must terminate? That's pretty anti-windows behavior. System-Modal behavior was outlawed starting with Win32.

Hey Dave, I should have thought of that! Make the window modal! That might work.
The reason is that folks are roosting on the program. They need to make only one entry per day (hours worked, at the end of the day) but they opening it up at 8:00am and letting it set in the background all day. This is a state agency and many of the PCs are not too whippy, so the more apps they leave open the slower their PC runs.
Nebraska Dept of Revenue
Previous
Reply
Map
View

Click here to load this message in the networking platform