Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making top level form active
Message
De
24/03/2003 11:09:05
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
21/03/2003 15:53:07
Larry Huisingh
Lockheed Martin Information Technology
Richland, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00768739
Message ID:
00769278
Vues:
23
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform