Click here to Skip to main content
15,886,046 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a big form which I intend to hold all the details of a company's data but I needed to have the form printed. I tried using the printform method but it only prints some part of the form. I made some searches but found articles in vb6 that used the hDC of a pictrebox to print a form but I don't know how to implement such in vb.net. Please can someone help me with the code to print the form. Thanks
Posted
Comments
Richard MacCutchan 28-Dec-14 5:13am    
Search the articles section; there are a number of sample print articles.

Look at the PrintDocument class[^] - it allows you to specify exactly what is printed, where, and what size. You shouldn't use PrintForm - it's a poor solution that doesn;t generally give good results. It's only real use is for debugging when you need an image of the whole screen to show an error properly.
 
Share this answer
 
Comments
Member 11048282 28-Dec-14 5:26am    
It would have been a great solution if I had wanted to print a text file. But I want to print the form and all of its controls which I still can't figure out how to do so with the Print Document Class.
OriginalGriff 28-Dec-14 5:30am    
You can print whatever you want with a PrintDocument class, that's the whole point...
Maciej Los 28-Dec-14 10:25am    
+5!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900