print window help

Is there any plugin or function to send to print what is displayed in the window?

to send the print to the default printer and print all the controls that are in the window.
In PrintForm function visual basic, direct commands and prints the printing anything containing the window.

thanks for your support.

You can use the DrawInto method of the window to capture a Picture of the client-area of the window (i.e. not the titlebar, menu, or borders.)

For example, this method will return a Picture of the passed window:

Function CaptureWindow(w As Window) As Picture Dim capture As New Picture(w.Width, w.Height, 32) w.DrawInto(capture.Graphics, 0, 0) Return capture End Function

Capturing the titlebar and borders (I think) requires declaring into platform-specific APIs. I have Windows code for doing it if that would be helpful.

create a picture object and use DRAWINTO

something like this (off top of my head)

dim p as picture
p=new picture(win1.width,win1.height,32)

43 seconds too long :slight_smile: