That's great, thanks Sergey!
>
>* MouseDown
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>* Top and Left of the button relative to the form
>* If button is placed directly on the form, this step is not necessary
>lnTop = OBJTOCLIENT(This, 1)
>lnLeft = OBJTOCLIENT(This, 2)
>
>* X and Y coordinates of the mouse relative to the button
>lnX = nXCoord - lnLeft + 1
>lnY = nYCoord - lnTop + 1
>* ...
>
>
>>
>>I have a command button with a little picture imgae (a tick) when action has been taken, otherwise it's displayed without the image.
>>
>>I know I could re-design the whole control to be in a container, but I was hoping I could detect when the mousedown event (part of the click) was over the little image rather than over the caption part of the button.
>>
>>I have so far been messing about with objtoclient(), the x and y coords in the mousedown without much success.
>>
Mathias Banda
Time is longer than a rope.