Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design right-click popup menus on main App Screen
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00695835
Message ID:
00696103
Vues:
12
Change it to
loForm.Activate()
>I like your suggestion better. So I put the following as a "Procedure" in my Main Menu "Navigator" selection:
>
>
>IF _Screen.FormCount > 0
>	FOR EACH loForm IN _Screen.Forms
>		IF loForm.Name = "navigator"
>			navigator.Activate()
>		ENDIF
>	ENDFOR
>ELSE
>	DO FORM navigator
>ENDIF
>
>
>The first time I select the Navigator menu, it works fine and does the ELSE condition. The second time I select the Navigator menu option, it steps through the FOR EACH statement and gets to the "navigator.Activate() line and gives the error "Object NAVIGATOR is not found."
>
>I can step it through the debugger and see that it's not being recognized as an object. Yet if I click Ignore, the form is still Activated. I don't understand why the command DO FORM navigator is not initially creating it as an Object reference. Any ideas?
>
>>I would rather itterate through screen's form collection to check if form already exists.
FOR EACH loForm IN _SCREEN.Forms
>>  IF loForm.Name = < >
>>* or
>>  IF loForm.Caption = < >
>>...
>>ENDFOR
>>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform