Screen Print to a Printer HELP.........

  • Thread starter Thread starter Chris Calhoun
  • Start date Start date
C

Chris Calhoun

Does anyone know how to with an event like on_buttonclick send a screen shot
of the active window to the printer. Explanation and\or code samples would
be helpful.


Thanks in advance!!!
 
Chris,

You will probably have to use a little interop code here. If you have
the handle to a window, and you have a device context handle (which you can
get from the Graphics class), then you can call PrintWindow to have the
window paint itself on the device context. Of course, you will have to make
the call through the P/Invoke layer.

Hope this helps.
 
A code sample would be helpful.

Thanks.
Nicholas Paldino said:
Chris,

You will probably have to use a little interop code here. If you have
the handle to a window, and you have a device context handle (which you can
get from the Graphics class), then you can call PrintWindow to have the
window paint itself on the device context. Of course, you will have to make
the call through the P/Invoke layer.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Chris Calhoun said:
Does anyone know how to with an event like on_buttonclick send a screen shot
of the active window to the printer. Explanation and\or code samples would
be helpful.


Thanks in advance!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top