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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Canvas Copy and Use

Status
Not open for further replies.

Johnsonit

Programmer
Nov 27, 2001
6
0
0
ZA
Can anyone give me some clue how to do this? I want to preview the Printer.Canvas before printing it. My Printer.Canvas consists of a number of different objects. It looks for me as if I need to display the Printer.Canvas in a Paintbox.Canvas. For this to happen I need to copy the Printer.Canvas to the Paintbox.Canvas using

Paintbox.Canvas.CopyRect(a, Printer.Canvas, a);

where a is the coordinates. But this does not seem to work. It does not display in the Paintbox. I have tried this in and out of the OnPaint. The only data that is shown in the paintbox those declared in the onPaint event. I've tried to write to the Paintbox.Canvas first and then copy that to the Printer.Canvas, but it did not help me at all. The statement and data that must be printed is set elsewhere in the program and it is not possible to set all of them in the onPaint event. Must I initialize or refresh or ??? the Paintbox in any way or what am I doing wrong? Please help urgent !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top