Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set focus to exe
Message
 
 
To
16/03/2004 12:55:59
Charlie Hancock
California Dept of Public Health
Richmond, California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00886769
Message ID:
00886793
Views:
17
See Re: SetForegroundWindow behavior frustrating Message #786656

>I'm calling a VFP 8.0 executable from within a FoxPro 2.6 application, using the command:
>
> RUN /N1 Foo.exe
>
>I want the called exe to act as much like a modal form as possible. The exe consists of a Main.prg and a single form. The Main.prg says:
>   Application.Visible = .F.
>   DO FORM Foo.scx
>   READ EVENTS
>
>The form has these properties set:
>
>   AlwaysOnTop = .T.
>   ShowWindow = 2  && top-level form
>   WindowType = 1  && modal
>When the exe is run, the form appears on top of the FP 2.6 program as I intend. The problem is that focus immediately goes back to the FP 2.6 program, even though the called VFP form is on top. How do I get the focus automatically to the VFP form, without the user having to click on it?
>
>Thanks in advance!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform