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

📄 comprotery.~pas

📁 所有delphi的入门例子
💻 ~PAS
字号:
unit comProtery;

{$WARN SYMBOL_PLATFORM OFF}

interface

uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
  ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls, ComCtrls;

type
  TPropertyPage1 = class(TPropertyPage)
    Label1: TLabel;
    Label2: TLabel;
    dpiker: TDateTimePicker;
    cmbStart: TComboBox;
    chkToday: TCheckBox;
    chk3d: TCheckBox;
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
    procedure UpdatePropertyPage; override;
    procedure UpdateObject; override;
  end;

const
  Class_PropertyPage1: TGUID = '{995533D6-25F6-4A5A-A36B-822C60F700A3}';

implementation

{$R *.DFM}
//uses XCalendar_Tlb;

procedure TPropertyPage1.UpdatePropertyPage;
begin
  { Update your controls from OleObject }
  chk3d.Checked :=OleObject.ctl3d;
  chktoday.Checked :=oleobject.usecurrentDate;
  cmbstart.ItemIndex := oleobject.startofweek;
  dpiker.Date := oleobject.calendardate;

end;

procedure TPropertyPage1.UpdateObject;
begin
  { Update OleObject from your controls }
  oleobject.ctl3d := chk3d.Checked;
  oleobject.usecurrentDate := chktoday.Checked;
  oleobject.startofweek := cmbstart.ItemIndex;
  oleobject.calendardate := dpiker.Date;
end;

initialization
  TActiveXPropertyPageFactory.Create(
    ComServer,
    TPropertyPage1,
    Class_PropertyPage1);
end.

⌨️ 快捷键说明

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