Page 1 of 1

A silly question

PostPosted: March 8th, 2004, 9:29 am
by darkangel
I'm new to DelphiArea and would like to post a silly question:
RE:Tprintpreview
I wanna use it to preview my images before printing them out, however, my images are all like bmp,jpg or gif, how can I get them previewed on this component TPrintPreview, as I found it can only load ppv data. Thank you in adance.

PostPosted: March 9th, 2004, 7:35 pm
by Johnny_Bit
preview.canvas.draw+F1

besides... you can print them on print preview canvas just like on normal printer canvas, isn't that nice?

Printer is not currently printing

PostPosted: March 10th, 2004, 1:11 am
by darkangel
Thanks for yr help, I use these codes:
....
bmp.LoadFromFile(opendialog.FileName);
printpreview.Canvas.Draw(0,0,bmp);
.....

however, there is an error as the subject, can you help fix it?
Could you please supply more detailed codes for me? I really apprecaite it.

PostPosted: March 10th, 2004, 6:49 am
by Johnny_Bit
before you draw execute method BeginDoc, and when you end execute EndDoc.

Thank you

PostPosted: March 10th, 2004, 7:07 am
by darkangel
I got it. Thank you very much!