Click to See Complete Forum and Search --> : Non-rectangular buttons and frame animations


bcyde
December 2nd, 1999, 01:34 PM
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.

Ravi Kiran
December 3rd, 1999, 03:49 AM
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

Mikesc
December 3rd, 1999, 08:39 AM
Go to www.vbaccelerator.com they have some cool code there for doing this