Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a non-rectangular button with Delphi?

Tags:

button

delphi

vcl

How to create a transparent non-rectangular button with Delphi?

like image 916
Tobassum Munir Avatar asked Mar 01 '23 08:03

Tobassum Munir


1 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 can't be selected by the keyboard you could also use a TImage and use the OnMouseUp event.

Or find a 3rd party button that already does what you want on Torry.

like image 91
Lars Truijens Avatar answered Mar 07 '23 13:03

Lars Truijens