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!

Print a form 1

Status
Not open for further replies.

yomyom

Programmer
Dec 23, 2002
119
GB
Dear programers,
how do I print the contents of a form.?
I use delphi 4.
yomyom
 
Do you mean an image of the displayed form or the code? To get an image of the displayed form, just use:
Code:
{Quick print of information display.}
Code:
procedure TfrmMain.pbPrintClick(Sender: TObject);
begin
  Print;
end;
Or else, be a little more specific with your request.
 
I mean the image / contents i.e the labels with its text etc. I tried issuing print and it flags it down as unknown identifier....
 
Maybe it's a Delphi 5 thing. The help says it uses TCustomForm.GetFormImage method, perhaps you can use that.

Alternative, you can manually key Alt-PrintScreen to copy an image to the clipboard, then paste that into Paint or Word, or whatever and print from there.
 
Dear Zathras,
form prints quite well with (print).
My next question was also answered before I asked which was how to capture the image on the clipboard.(double thanx)!
yomyom.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top