Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

results from print dialog

Status
Not open for further replies.

pconrad

IS-IT--Management
Jul 12, 2002
28
US
I want to use the cancel & OK results from the printer dialog to either print the form or not. How is this acconplished?

Thanks,

PC
 
Hi,

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;


Steph [Bigglasses]
 
I knew it was simple, but just had a brainlock.
Thanks,
PC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top