I have a form with some picture boxes as buttons. I'm setting the picture
property to a gif file for "normal", and to a different gif for the
"pressed" state. This works fine. I get into trouble with the fact that the
gif files have a transperent region in the middle (the button icon) that
lets the back color of the picture box show through. This lets me change the
button highlight to any user-specified color when I mouseover the picbox
(which is done very inefficiently I might add, but that's another story).
Everything works, except that I get occasional flicker that shows through
the image as the backcolor is changing. Is there a way to change the picture
box backcolor without any flicker? I've tried setting it to invisible and
then back, played with z-order, LockWindowUpdate API, etc., all to no avail.
Some type of memory painting/swapping maybe?
Any help is greatly appreciated. Any good advice for an efficient
"mouseover" event for controls would also be greatly appreciated.
Thanks much in advance