program singletonTest;
uses
Forms,
mainfrm in 'mainfrm.pas' {Form1},
singletonfrm in 'singletonfrm.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
unit singletonfrm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton...[ 查看全文 ]