Solved

Printer.print line

Posted on 2007-04-11
2
175 Views
Last Modified: 2008-02-01
I have a line on one of the vb forms. I want to print this line. The following command fails
printer.print form1.line.
Is there any other way of doing this?

Thank you in advance.
0
Comment
Question by:Aiysha
2 Comments
 
LVL 12

Expert Comment

by:jkaios
ID: 18893460
I'm afraid you cannot do that. However, if you want to print the line on the form including the form itself then you can simple use the PrintForm method instead.

Form1.PrintForm
0
 
LVL 6

Accepted Solution

by:
Muflone earned 500 total points
ID: 18920987
If you need to print just a straight line you can use:
Printer.Line (a,b)-(c,d)
where a and c are the x axis and b and d are the y axis

You can also choose a color for print the line adding RGB(xxx, yyy, zzz)
xxx = red component
yyy = green component
zzz = blue component
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

895 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

11 Experts available now in Live!

Get 1:1 Help Now