Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printer.print line

Posted on 2007-04-11
2
Medium Priority
?
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

688 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