How can I create a non-rectangular button with Delphi?
3 answers
Basically you use SetWindowRgn to define the shape of your button / control / window. See here for an example.
Or, if you don't mind that your button cannot be selected by the key, you can also use TImage and use the OnMouseUp event.
Or find a third-party button that already does what you want on Torry .
+4
source to share
You can only use SetWindowRgn if you don't mind that it looks pretty weird - bits that go outside the region will just disappear. Your best bet probably comes from TCustomTransparentControl, but then you will need to do some regular painting. I suspect this ordinary painting was what you were expecting all along?
+2
source to share