Printing Entire Contents of a Form

liquidspaces

Well-known member
Joined
Nov 19, 2002
Messages
74
Location
Richmond, VA
Can anybody point me to an article/tutorial about printing the entire contents of a form in VB.Net? Ive searched msdn, but havent come up with anything yet.

Thanks,
Kevin
 
Copy to bmp file them print the bmp...

If you cant do it directly then why not indirectly?

try copying the entire form as a .bmp to a file and then print that file...

I have only a vague idea on how to do that and will explore it, but if anyone out there thinks that you can do it please do as I have a great deal on my plate to get done this month....


Thanx...

This might help:

NOTE: Copy the following ( with out the quotes ) to your IE address bar and press <Enter>

"ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemDrawingPrintingPrintDocumentClassPrintTopic.htm"



Question: Why doesnt the URL code below work??
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemDrawingPrintingPrintDocumentClassPrintTopic.htm
 
Last edited by a moderator:
Use [mshelp] tags around mshelp links to format them correctly, and also automatically provide a link to the online msdn version as well.
 
This code isnt mine, I found it on the web. It seems to do what you want. Ive been tinkering with it for a project.


Option Explicit On
Option Strict On
**********************************************************************************
PrintForm Class

Purpose: Print active window

Dependencies:

Author:
 
Okay,

Heres three ways to do it:

1) If you the form is on the screen and is not cut off in any way (ie: no other window is above the form by any means, and the form is not off the screen), and all the controls on the screen are things like labels and buttons, not any of YOUR own classes:

http://www.c-sharpcorner.com/Code/2003/March/FormPrinting.asp

2) Same as one but you have some of your own classes or things not defined by ControlPaint.draw.. (groupbox is NOT)

http://www.c-sharpcorner.com/Graphics/ScreenCaptFormMG.asp

3) You are in the same boat as me and have your own classes and things like the print dialog or the form being too big on the screen (it might use scroll bars, might be off the monitor, etc) getting in the way and taking place of the actual "image".

http://www.computerhelp.forum/t74549/s.html
 
Back
Top