I have PB 22 and have a picture button that I want to change the image when a user hovers over the button. I can map an event (pbm_mousemove) that works fine but, is there an event that tells me when the mouse has moved off of the object? I then want to change the picture to something else when this occurs, but I can't find a corresponding event.
Also, I don't necessarily have to use a picturebutton. Maybe a different object would work too.
Example - p_1.picturename = black, original image, then when I hover over it, change picturename to white, When mouse has moved off, change picturename back to black.
Andreas.
What I do is add the same HitTest UE to the parent Window . When the mouse is detected via the HitTest on the button, your code there would change the picture to the alternate image. I also would register the control via a PowerObject Pointer instance variable on the Parent window. When the Window gets the HitTest UE and sees that its PowerObject instance variable is valid, it then uses that object pointer to send a second UE notice back to that last active control (ie: your picture button) and then it set's the PO pointer back to NULL. Meanwhile, the button receives the 2nd UE and that is the queue to restore the initial image being displayed on the button. This allows for a nice OO approach to your challenge as the CB's behaviour is now totally encapsulated to the button itself. HTH
Regards .. Chris