Es gibt einen Unterschied zwischen Klassenmethoden und normalen Prozeduren.
Hier ist eine normale Prozedur gefordert:
Delphi-Quellcode:
uses
,OneInstance
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure NewInst(ProcessId: Cardinal; CmdLine: string; var Allow: Boolean);
begin
// ?
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
OneInstance.NewInstProc:= NewInst;
end;
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."