Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Printing Forms from Visual Basic using PrintForm

I am trying to print Visual Basic Form From VB application, using PrintForm method.The Form Contains ,many Label controls and Line controls, in which I pass data  during run time.Its working.But some times forms are Printed half or Line controls are mis-aligned.Please help me out ?
0
jigyasu
Asked:
jigyasu
1 Solution
 
Erick37Commented:
"HOWTO: Capture and Print the Screen, a Form, or any Window"
 
http://support.microsoft.com/support/kb/articles/Q161/2/99.ASP 
0
 
BarryTiceCommented:
That can be useful, but it converts the screen to an image in a picture object. If you have small type or other fine detail, it becomes harder to read on the printout.
0
 
paulstampCommented:
Its sometimes useful to write your routines which do the drawing in such a way that they can accept a parameter to specify a target object - ie a form, picture box, or the printer object.

Most of the drawing/print methods available for picture boxes and forms also work with printers, so you can use the same rountines to print both to screen and to printer.

ie

private sub DrawBox(x1 as integer, y1 as integer, x2 as integer, y2 as integer, target as any)

   target.line (CX * F1, CY * F1)-(CX * F2, CY * F2), , BF

end sub
   

0
 
Erick37Commented:
I agree with paulstamp.
The only way to print exactly what you see is to do the same drawing functions on the printer that you do on the form.
PrintForm is buggy.
0
 
jigyasuAuthor Commented:
Thanks forn the response.I accept that Printform is not a FoolProof method but there will be ways to Minimize the errors.I am looking for those positive steps in using Print form.Once again Thanks a lot for the response.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now