打印本文 打印本文 关闭窗口 关闭窗口
一个超链接Image控件!(For D3,D4,D5,D6)源代码
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2609  更新时间:2009/4/23 18:44:15  文章录入:mintao  责任编辑:mintao
then
      ControlStyle := ControlStyle + [csOpaque]
    else
      ControlStyle := ControlStyle - [csOpaque];
    if DoPaletteChange and FDrawing then Update;
  end
  else ControlStyle := ControlStyle - [csOpaque];
  if not FDrawing then Invalidate;
end;

function THImage.CanAutoSize(var NewWidth, NewHeight: Integer): Boolean;
begin
  Result := True;
  if not (csDesigning in ComponentState) or (Picture.Width > 0) and
    (Picture.Height > 0) then
  begin
    if Align in [alNone, alLeft, alRight] then
      NewWidth := Picture.Width;
    if Align in [alNone, alTop, alBottom] then
      NewHeight := Picture.Height;
  end;
end;

procedure THImage.CMMouseLeave(var Message:TMessage);
begin
  inherited;
  if FPicture<>FPictureNormal then
    Picture.Assign(FPictureNormal);
end;

procedure THImage.CMMouseEnter(var Message: TMessage);
begin
  inherited;
  if FPicture<>FPictureHot then
    Picture.Assign(FPictureHot);
end;

procedure Register;
begin
  RegisterComponents(''''Lee'''', [THImage]);
end;

end.

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口