Solved

Printing Forms from Visual Basic using PrintForm

Posted on 2000-02-15
5
208 Views
Last Modified: 2013-11-25
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
Comment
Question by:jigyasu
5 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 2524451
"HOWTO: Capture and Print the Screen, a Form, or any Window"
 
http://support.microsoft.com/support/kb/articles/Q161/2/99.ASP 
0
 
LVL 7

Expert Comment

by:BarryTice
ID: 2524901
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
 
LVL 3

Accepted Solution

by:
paulstamp earned 10 total points
ID: 2527889
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
 
LVL 32

Expert Comment

by:Erick37
ID: 2528250
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
 

Author Comment

by:jigyasu
ID: 2529451
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now