You put the event property in your DataModule:
private
FOnAfterScroll : TNotifyEvent;
public
property OnAfterScroll : TNotifyEvent read FOnAfterScroll write FOnAfterScroll;
Then you call this event in the AfterScroll procedure in the DataModule:
If Assigned(FOnAfterScroll) then FOnAfterScroll(Self);
In the form: declare an event handler
procedure HandleAfterScroll(Sender : TObject);
Then you assign the procedure DataModule OnAfterScroll
Datamodule1.OnAfterScroll: = MyHandleAfterScroll;
Another way would be to send a custom Windows message from the DataModule and reply to this message in the form.
source
share