http://www.lmd.de/有很多,有原码。

解决方案 »

  1.   

    procedure TForm1.FormCreate(Sender: TObject);
    var
      rgn:HRGN;
      arrPoint:array[0..2] of TPoint;
    begin
      arrPoint[0].x:=0;
      arrPoint[0].y:=0;
      arrPoint[1].x:=Button1.Width;
      arrPoint[1].y:=0;
      arrPoint[2].x:=0;
      arrPoint[2].y:=Button1.Height;
      rgn:=CreatePolygonRgn(arrPoint,3,1);
      SetWindowRgn(Button1.Handle, rgn, true);
    end;
      

  2.   

    ‘各種形狀的按扭’通常不是单单用delphi畫出来的,而是要利用其他的图形或图像编辑软件,如PhotoShop等,来一起完成。
    由于delphi原有的按钮(Button组件)形状单一,且其上不能粘贴图形,所以各种花样翻新的按钮必须利用其他组件来实现,例如用Image组件。
    用PhotoShop等软件制预先作好按钮的形状,再将它装在Image组件上,就成了具有该图像的按钮。然后为Image组件的OnClick事件编程就可以了。