Le 14 août 06 à 23:21 Soir, Robert Poland a écrit:

I have a canvas (Canvas1) which is behind about 20 StaticText and editfields. I am trying to print what appears on the screen. I do not want to have to recreate the entire screen for the printer. And as per many many examples I do not want to print "Hello World".

A "print screen" while not desirable could be acceptable.

Are there any examples out there?

I'd suggest using the "DrawInto" method of a window. Something like that:

  dim p As Picture
  dim q As Picture

  p=NewPicture(self.Width,self.Height,32)
  self.DrawInto p.Graphics,0,0

'Now, 'p' contains the window's appearence. Only the canvas is of interest, so:

  q=NewPicture(Canvas1.Width,Canvas1.Height,32)
q.Graphics.DrawPicture p, 0,0,Canvas1.Width,Canvas1.Height,Canvas1.Left,Canvas1.Top,Canvas1.Width, Canvas1.Height

'Now, 'q' contains the canvas' appearence.

("self" is the window holding the canvas).


_______________________________________________
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>
  • Print screen Robert Poland
    • Re: Print screen Arnaud Nicolet

Reply via email to