unit1.~pas

来自「快速、灵活、易用的Excel网络化工具」· ~PAS 代码 · 共 55 行

~PAS
55
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,AdoConED;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses UnitExportExcel, UnitDataModule, ADODB;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  try
    FrmExportExcel:=TFrmExportExcel.Create(Application);
    FrmExportExcel.ShowModal;
  finally
    FrmExportExcel.Free;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  with DM.AdoConnection1 do
  begin
    Close;
    if EditConnectionString(DM.AdoConnection1) then
    try
      Connected:=true;
    except
      ShowMessage('连接数据库错误!');
    end;
  end;
end;

end.

⌨️ 快捷键说明

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