I am new to Delphi - in spite of looking at numerous text books, I cannot find a simple way of printing a screen shoot. Is there one?
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);
Hope this helps.
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);
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
Hi. so this is actually a continuation from another question of mineHere but i was advised to start a new thread as the original question was already answered.
This is the result of previous question answered :
code for the listbox - datagridview interaction
At the top of the code ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...