Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SKIP FOR expression
Message
De
18/01/2005 10:45:10
 
 
À
18/01/2005 10:36:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
00977929
Message ID:
00978117
Vues:
22
hi Terry,

The remarks also apply to the use you have for it.
_______________________________
>Thank you, Gregory
>
>This routine is used for something else, to see if a named form is open, and was not meant for Peter's problem. I just thought it might be useful to him to adapt it. But, yes, if used for closing forms down then you'd be right.
>
>>Terry,
>>
>>You'd better loop from screen.formcount to 1 step -1.
>>If you start by one, the formcount may have decreased by the time you get to lnFormCount.
>>
>>Then, _SCREEN.Forms( lnFormNo).name will throw in an error
>>
>>
>>UPDATE: Hence the index you are returning may be wrong (form gone, index of wrong form)
>>__________
>>
>>>Peter
>>>
>>>Sorry, I haven't time to adapt this but might the main body of this code be useful?
>>>
>>>Terry
>>>
>>>
>>>
>>>* Supplied with a form's name property, go thru list of
>>>* open forms to see if that form is open.
>>>* ____________________
>>>LPARAMETER	tcFormName
>>>LOCAL		lnFormCount, llOpen, lnFormNo, lnOpenFormNo
>>>
>>>llOpen		= .F.
>>>lnFormCount 	= _SCREEN.FormCount
>>>lnOpenFormNo	= 0
>>>If lnFormCount > 0
>>>    lnFormNo 	= 1
>>>    Do WHILE lnFormNo <= lnFormCount ;
>>>       AND   not llOpen
>>>      If ALLTRIM( LOWER( _SCREEN.Forms( lnFormNo).Name)) = ALLTRIM( LOWER( tcFormName))
>>>          llOpen	      = .T.
>>>          lnOpenFormNo  = lnFormNo
>>>      Else
>>>         lnFormNo	      = lnFormNo + 1
>>>     Endif
>>>    EndDo
>>>Endif
>>>
>>>Return lnOpenFormNo		&& index of specified inquiry form
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform