this code will capture the result of the Ok & cancel button on the printerdialog.If the user presses Ok the result is true, in all other cases result will be false.
procedure TForm1.Button1Click(Sender: TObject);
var
Result: boolean;
begin
Result := PrintDialog1.Execute;
if Result then
showmessage('Print something')
else
showmessage('Canceled')
end;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.