Any free button shapes available?

I recently uploaded a source to an open source project, which unfortunately has dependencies on a bunch of expensive native libraries, including Infopower 1stClass , which is apparently used mainly for TfcShapeButton, a component that acts like standard TBitBtn, except that you can give it an arbitrary polygonal shape by describing a list of points. The DFM code is as follows:

      PointList.Strings = (
        '8,29'
        '18,19'
        '28,29'
        '20,37'
        '16,37')

I'm trying to clean up this project and make it look like a real open source project that anyone can download and build without having to lay out hundreds of dollars for component libraries, but I would like to change the look and feel as little as possible. So does anyone know about an open source form button component like this that will work with D2009 and above?

+3
source share
2 answers

this piece of code does exactly what you need.

const Points: array [1..5] of tPoint = (
    (x:8;y:29),
    (x:18;y:19),
    (x:28;y:29),
    (x:20;y:37),
    (x:16;y:37) );

begin
  SetWindowRgn(Button2.Handle, CreatePolygonRgn(Points, 5, WINDING), True);
end;
+3
source

Mason, a much better way to create a button shape is to have a mask for him. The component that does this should be here: http://www.delphi-jedi.org/

+2

Source: https://habr.com/ru/post/1724219/


All Articles