What does (Sender:TObject) mean?? As in:
procedure TForm1.Button1Click(Sender:TObject);
var
s: Integer;
begin
.....
.....
end;
Sender is a reference to the component that fired the event. In this case, Sender is going to be the button the user clicked which called your Button1Click event.
This is useful when you have several components that call the same event and you need to figure out which component caused the event to be fired.
For instance, you could do something like:
if Sender = Button1 then
// ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With