If you mean printing the form you are viewing the answer is yes. Every form has one property and one procedure (method) to print a form.
First make sure the PrintScale property is set to poPrintToFit. This will ensure that the is resized to fit on whatever printer is the default. Otherwise when you print the form it might come out on more than one sheet of paper and be cut off.
Next drop a button on your form and execute the form's print method like this:
procedure TYourFormsName.btn_printClick(Sender: TObject);
Thanks for the advice which has helped in part. All the labels and other Delphi components have been printed, but I had also produced some lines using the canvas.lineto command. Although present on the screen, they have not printed. The main aim is to produce a graph like object from data captured in real time. I have sufficient experience to produce the hardware to produce the data and now need to display it. What puzzles me is that there appears to be such problems in printing the contents of the screen.
The screen print method that I referred to will print the form and all children of the form. I'm just guessing, but if you have overlaid a canvas over the form, but it doesn't belong to the form (i.e. is not a child of the form) then that may be why it is not printing. It's been a while since I've worked directly with canvases.
All the labels and other Delphi components have been printed, but I had also produced some lines using the canvas.lineto command. Although present on the screen, they have not printed. The main aim is to produce a graph like object from data captured in real time.
lespitts, may be this help You, but could it not be a better solution.
It is equivalente to press key Print Screen (screen shot): Keybd_Event(VK_Snapshot, 0, 0, 0);
It is equivalente to press key Alt + Print Screen (active window shot): Keybd_Event(VK_Snapshot, 1, 0, 0);
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...