这跟函数有问题
Address是一个属性,在这里使用Address:=Value会出现递归调用:你一直在更改属性,也就是调用SetAddr,结果堆栈溢出
procedure  TMyLinkLabel.SetAddr(Value:string); 
begin 
    Address:=Value; 
end; 修改成
type 
    TLinkLabel  =  class(TCustomLabel) 
    private 
        {  Private  declarations  } 
        function  GetAddr:string; 
        procedure  SetAddr(Value:string); 
    protected 
        {  Protected  declarations  } 
        FAddress:String;
        procedure  WMLButtonDown(var  msg:TWMLButtonDown);message  WM_LButtonDown; 
    public 
        {  Public  declarations  } 
        constructor  Create(AOwner:TComponent);OverRide; 
    published 
        {  Published  declarations  } 
        property  Align; 
        property  AutoSize; 
        property  Cursor; 
        property  Font; 
        property  Hint; 
        property  ShowHint; 
        Property  Visible; 
        property  Address:string  read  GetAddr  write  SetAddr; 
    end; procedure  Register; implementation function  TLinkLabel.GetAddr:string; 
begin 
    result:=FAddress; 
end; procedure  TLinkLabel.SetAddr(Value:string); 
begin 
    FAddress:=Value; 
end; 
    
procedure  TLinkLabel.WMLButtonDown(var  msg:TWMLButtonDown); 
begin 
    if  (Pos('http://',LowerCase(Address))=0)  and  (Pos('@',Address)=0)  and 
          (Pos('ftp://',LowerCase(Address))=0)  then 
        MessageDlg('地址无效',mtError,[mbOk],0) 
    else 
        ShellExecute(0,nil,Pchar(Address),nil,nil,SW_ShowNormal); 
end; constructor  TLinkLabel.Create(AOwner:TComponent); 
begin 
    Inherited  Create(AOwner); 
    Font.Name:='宋体'; 
    Font.Color:=clBlue; 
    Font.Size:=9; 
    Cursor:=crHandPoint; 
    Address:='http://ywbtaxi.home.sohu.com'; 
end; procedure  Register; 
begin 
    RegisterComponents('std1',  [TLinkLabel]); //std1是一个已存在的面板
end; end.