Hi Trey,
Yes, this is for a button that operates on the target object, and I already have a property that can be filled with target object. I just am being lazy and trying to make a smarter button :)
Alex
>I assume this is for a button that operates on the target object which was added dynamically somehow.
>
>What I would do instead is one of two things:
>
>1. In the code that dynamically adds the target object, also add the corresponding button, with a reference (name or object) to the target object. e.g.
>
>lcNewName="newName"
>lcNewButton="cmdFor"+lcNewName
>oForm.NewObject(lcNewName, cClass, cLib)
>oForm.NewObject(lcNewButton, "yourCmdButtonClass", "yourlib")
>oForm.&lcNewButton..cOperatesOn = lcNewName
>* etc.
>
>2. Add a container class with just the target object and commandbutton.
>
>
>HTH
>
>Trey
>
>>Hello,
>>
>>I need to find the first object to the left of a command button.
>>
>>I'm trying to take advantage of sys(1270), but the problem is, SYS(1270) tells me which object exists in a given position relative to the windows desktop, but I don't know how to determine the position of the button relative to the windows desktop.
>>
>>TIA,
>>Alex