⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 designpoint.pas

📁 Rich Text Format (.RTF) 格式資料的非視覺化元件
💻 PAS
字号:
unit DesignPoint;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TDesignPoint = class(TComponent)
  private
    FSleepPerPixel: Cardinal;
    function GetLeft: SmallInt;
    function GetTop: SmallInt;
    procedure SetLeft(const Value: SmallInt);
    procedure SetTop(const Value: SmallInt);
    procedure SetSleepPerPixel(const Value: Cardinal);
  public
    constructor Create(AOwner: TComponent); override;
  published
    property Top: SmallInt read GetTop write SetTop;
    property Left: SmallInt read GetLeft write SetLeft;
    property SleepPerPixel: Cardinal read FSleepPerPixel
                                     write SetSleepPerPixel
                                     default 5;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('StreamSec', [TDesignPoint]);
end;

{ TDesignPoint }

constructor TDesignPoint.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FSleepPerPixel := 5;
end;

function TDesignPoint.GetLeft: SmallInt;
begin
  Result := SmallInt(LongRec(DesignInfo).Lo);
end;

function TDesignPoint.GetTop: SmallInt;
begin
  Result := SmallInt(LongRec(DesignInfo).Hi);
end;

procedure TDesignPoint.SetLeft(const Value: SmallInt);
var
  LR: LongRec;
begin
  LR := LongRec(DesignInfo);
  LR.Lo := Word(Value);
  DesignInfo := LongInt(LR);
end;

procedure TDesignPoint.SetSleepPerPixel(const Value: Cardinal);
begin
  FSleepPerPixel := Value;
end;

procedure TDesignPoint.SetTop(const Value: SmallInt);
var
  LR: LongRec;
begin
  LR := LongRec(DesignInfo);
  LR.Hi := Word(Value);
  DesignInfo := LongInt(LR);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -