Non-rectangular buttons and frame animations
I was just wondering if anyone knew how to make buttons (or picture boxes that would act like command buttons) that could be any shape. Also, I have a form that sizes itself around an image (unwanted areas are transparent) and was wondering if I could make it change shape to another image smoothly. Any help would be greatly appreciated.
Re: Non-rectangular buttons and frame animations
Simple type of irregular shapes for any window ie has hWnd, ( labels etc are ruled out) can be got using SetWindowRgn fn, with approp rgn
So, put a command btn, set its style to 1- picture, and add pictures, and on top of it set the (clip/window) region to any shape it works. But make sure that the picture is fully seen, and in both modes (down & up)
If you already have the code of how to create a Region out of bitmap, then use that. it would be more correct, in the sense that if you change the bitmap the region changes automatically
RK
Re: Non-rectangular buttons and frame animations
Go to www.vbaccelerator.com they have some cool code there for doing this