We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI recently downloaded the source to an "open source" project that unfortunately has dependencies on a bunch of expensive proprietary libraries, including Infopower 1stClass, which it seems to use primarily for TfcShapeButton, a component that acts like a standard TBitBtn, except that you can g开发者_开发问答ive it an arbitrary polygonal shape by describing a list of points. The DFM code looks like this:
PointList.Strings = (
'8,29'
'18,19'
'28,29'
'20,37'
'16,37')
I'm trying to clean this project up and make it look like a real open-source project that anyone can download and build without having to shell out hundreds of dollars for component libraries, but I'd like to change the look and feel as little as possible. So does anyone know of an open-source shape button component like this that will work with D2009 and up?
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;
Mason, a much better way of making a shaped button is to have a mask for it. The component that does that should be here: http://www.delphi-jedi.org/
精彩评论