logo       

Re: Help with canvas to printer: msg#00181

lang.realbasic.beginner

Subject: Re: Help with canvas to printer

On Mar 23, 2006, at 11:16 PM, Dave Bert wrote:

I am new to RB so please forgive me for that part :) I have an example that I could send you so we could discuss this better if you don't mind. I can print text and boxes etc just fine but graphics and canvases are totally new to me. My example is a feeble attempt at what I scrounged on the net to make this work and now I am totally confused. Let me know...

Nah, let's do it on the list so that everyone can learn. :)

Let's say we have a window with a canvas. You want to print what's in that canvas. But you can't, but the canvas forgets what it's drawn as soon as it's done. So we need to give the window a property, say something like MyPicture as Picture. Now, wherever you were drawing to the canvas, draw instead to MyPicture.Graphics. Then in the canvas's paint event, you'd put g.DrawPicture MyPicture,0,0 (or something like that; this is from memory). When you're ready to print, you'll get a graphics object from the printer. In that graphics object, write DrawPicture MyPicture,0,0 (just like for the canvas).

I'm not sure I explained that very well. Let me know if I just made things worse. ;)

--
Brad Rhine
support@xxxxxxxxxxxxx
http://bradrhine.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise