Try out the stuff that Aaron gave here http://www.vbforums.com/showthread.p...threadid=85304
It's a little longer, but it has custom images, and he says it
already works (with no mention that painting oddity you see).

I've never used the hook functions that are in the code you
posted before, so I don't know what to do about that
WM_NCPAINT message, but I have an idea. Since you're actually
acting on that one, could you do something like GetActiveWindow
to get the window that your button will potentially come over,
then do the stuff for the WM_NCPAINT message, and then use
SetActiveWindow (or SetForegroundWindow etc) to make that
window active again, and thus recover that button?