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

📄 cvreg.pas

📁 一个窗口控制TCursorView显示静态或动画的游标在一种形式。控制使用标准的静态类节目,栩栩如生的API来窗口的鼠标,因为那是非常小。
💻 PAS
字号:
{------------------------------------------------------------------------------}
{                                                                              }
{  TCursorView v1.02                                                           }
{  by Kambiz R. Khojasteh                                                      }
{                                                                              }
{  kambiz@delphiarea.com                                                       }
{  http://www.delphiarea.com                                                   }
{                                                                              }
{------------------------------------------------------------------------------}

{$I DELPHIAREA.INC}

unit CVReg;

interface

uses
  Windows, Classes,
  {$IFDEF COMPILER6_UP} DesignIntf, DesignEditors {$ELSE} DsgnIntf {$ENDIF};

type

{ TWavePropertyEditor }

  TCursorFilePropertyEditor = class(TStringProperty)
  public
    procedure Edit; override;
    function GetAttributes: TPropertyAttributes; override;
  end;

procedure Register;

implementation

uses
  CursorView, Dialogs, SysUtils;

{ TCursorFilePropertyEditor }

function TCursorFilePropertyEditor.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog, paMultiSelect];
end;

procedure TCursorFilePropertyEditor.Edit;
var
  I: Integer;
begin
  with TOpenDialog.Create(nil) do
    try
      Filter := 'Cursor files (*.cur;*.ani)|*.cur;*.ani|Any file (*.*)|*.*';
      Options := Options + [ofPathMustExist, ofFileMustExist];
      if Execute then
      begin
        for I := 0 to PropCount - 1 do
          TCursorView(GetComponent(I)).FileName := FileName;
        Modified;
      end;
    finally
      Free;
    end
end;

procedure Register;
begin
  RegisterComponents('Delphi Area', [TCursorView]);
  RegisterPropertyEditor(TypeInfo(TFileName), TCustomCursorView, 'FileName', TCursorFilePropertyEditor);
end;

end.

⌨️ 快捷键说明

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