Is it possible to store the current values of a procedure to call it later?
Something like:
Something like:
Code:
var [b]procdat[/b]:[COLOR=red]TCompleteProcedureData[/color red];
procedure TForm1.Memo1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
[COLOR=red]StoreAllValues[/color]([b]procdat[/b]); // procdat should contain now the pointer to TForm1.Memo1MouseMove and all the current parameters (= sender, shift, x, y)
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
[COLOR=red]ExecuteProcedureWithOriginalValues[/color]([b]procdat[/b]); // uses the values with which Memo1MouseMove has been called originally
end;