Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making top level form active
Message
From
24/03/2003 11:09:05
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
21/03/2003 15:53:07
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00768739
Message ID:
00769278
Views:
39
Hi Larry,

I had the same problem. When I tried using the ACTIVATE WINDOW wname that Sylvain suggested, it didn't solve my problem. Did it work for you?

My solution was to put the following before the READ EVENTS statement in my startup VFP prg:
DO FORM app_start
lh_form = _SCREEN.ACTIVEFORM
DECLARE SHORT SetForegroundWindow IN USER32.DLL INTEGER hWnd
=SetForegroundWindow(lh_form.HWnd)
You could also try looking for the thread entitled, "SDI Form Does not get Focus on Instantiation" under Forms&Form designer.

Hope some of this can work for you too if needed.

Mike


>Where do I put this command? In my PRG file right after the DO FORM MyForm or somewhere within the form?
>
>Larry
>
>>
ACTIVATE WINDOW MyForm
HTH
>>
>>>I have a single form called from a PRG. It is set up as a top level form. I also set _SCREEN.Visible=.f. at the top of my PRG. The problem is that when I run the executable I create I see the form (with no desktop, as desired) but I have to click on the screen to make it active. I have mostly done FPW apps so I'm not that fluent in the basics of VFP 6. What do I need to add to make the form active?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform