I dont use the VCL either but I still make use of TNotifyEvent
Maybe you need to make your own event handler then:
[pascal]
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
Type
TMyNotify = Procedure(Value : Integer) of Object;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
FNotify: TMyNotify;
procedure SetNotify(const Value: TMyNotify);
{ Private declarations }
public
{ Public declarations }
Property Notify : TMyNotify read FNotify write SetNotify;
Procedure MyNotifyHandler(Value : Integer);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
If Assigned(Notify) then
Notify(100);
end;
procedure TForm1.MyNotifyHandler(Value: Integer);
begin
Button1.Caption := IntToStr(Value);
end;
procedure TForm1.SetNotify(const Value: TMyNotify);
begin
FNotify := Value;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Notify := MyNotifyHandler;
end;
end.
[/pascal]
Bookmarks