Information générale
Catégorie:
Programmation Orientée Object
>>>Ben,
>>>
>>>Chcek out ASelObj() and the Parent property of the object and then the parent property of its container and so on.
>>
>>Jim,
>>
>>When we are editing a method code, its object may not be currently selected. We might have clicked at a blank area of the form and ASelObj() does not create any array. Even worse, controls of another form (two forms are simultaneously opened) may be currently selected and the ASelObj() function puts irrelevant information into the array.
>>
>
>You can use AMOUSEOBJ(), and check the return - if it returns 0, the mouse isn't over a control or form. Pre-create the array and initialize it to NULL; you can detect whether or not you're positioned over a control on a form, or just a form (you're on the form, but no control is under the mouse. You can check individual members with ISNULL() that way.
>
>>Ben.
Ed,
Thank you for your suggestion. Do you mean that before running the program, the programmer puts his mouse over the corresponding object (or form). This is a solution. However, I am afraid this may not be better than the way we are currently doing (selecting from a list if name duplication found). It is because very often the form is covered by code windows.
Ben
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement