Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activecontrol
Message
De
16/07/2001 08:06:38
 
 
À
15/07/2001 12:05:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00530617
Message ID:
00530924
Vues:
26
Hi Yashodhan

>> But in the next line again it is not working. The code I wrote was -
DO FORM LookUp WITH THISFORM.Activecontrol.Name
WAIT THISFORM.Activecontrol.Name window
In the first command it passed the name. In second command it generated the error. I will really appreciate if you can tell me the exact concept of Activecontrol and how it works. <<

Ah. You did not tell me that you were trying to do something with the active control in another form < s >. In that case, you need this in the Init() of your Lookup Form:

LPARAMETERS toControl

You also need to add a property to your Lookup form called oControl to hold the object reference because, if you want it to be available to methods in the Lookup form other than the Init. If you do not save it to a form property, the reference will vanish when the init ends because it is scoped to the current method.

So the next line in your init would be something like this:

This.oControl = toControl

I am assuming, of course, that the calling form has actually verified that toControl is an object < s >.

You waould call Your LookUp form using an object reference:
IF TYPE( 'Thisform.ActiveControl.Name' ) = 'C'
 DO FORM Lookup WITH Thisform.ActiveControl
ENDIF
If you have put the code I have above in the Lookup form's Init, you should be able to put this line:

WAIT WINDOW 'toControl.Name is ' + toControl.Name

and get the name of the control that was passed to the lookup form.

HTH.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform