Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top level form does not get the focus
Message
 
To
13/03/2002 11:37:00
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00627628
Message ID:
00632349
Views:
32
>>>>Remember that Windows is a pre-emptive multi-tasking operating system. IOW, whether or not an application has focus, it still gets a time-slice of the processor and processing continues. If this is VFP 7.0, just past the _VFP.hWnd property to the same API function as in the other case. If pre-7.0, use either the FindWindow() API call passing the _SCREEN.Caption property to get the window handle or MainhWnd() from Foxtools.
>>>
>>>GetActiveWindow() does not accept any parameter. I tried:
>>>
>>>
>>>GetActiveWindow(_VFP.hWnd)
>>>
>>
>>I was referring to SetActiveWindow() which does.
>
>I tried it and that doesn't do it.

Sorry again for the delay (yeah, there are times I actually do work< bg >).

About the only thing I could suggest here (if SetActiveWindow()) isn't doing it would be to try _SCREEN.Activate in code instead, or SetForegroundWindow().

I've noticed that VFP 7.0 is, for want of a better term, a bit "flakey" when it comes to getting the focus. Every once in awhile, both at home on Win98SE and here at work on Win2K Pro SP2, when I switch from another application to VFP 7.0, I'll start typing and hear a ding. When I look at the screen, nothing's been typed. I then have to click somewhere in the VFP window for it to start getting my input.
George

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

Click here to load this message in the networking platform