Solved

Print dotted-lines

Posted on 1998-06-25
6
265 Views
Last Modified: 2013-12-03
What is the best possible way to print dotted lines
We are using the createpen-api but it doesn't always work
the printout on a HP-printer looks like: - - - - -
and on a canon it looks like: ---------
How can we get the same printouts ? (any printer)
0
Comment
Question by:ga
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:swilt
ID: 1464248
Try using Printer.Line

Printer.DrawStyle = vbDashDotDot
Printer.DrawWidth = 1
Printer.Line (0, 0)-(1000, 1000)
Printer.EndDoc


Other DrawStyle values:

vbSolid      0      (Default) Solid
vbDash      1      Dash
vbDot      2      Dot
vbDashDot      3      Dash-Dot
vbDashDotDot      4      Dash-Dot-Dot
vbInvisible      5      Transparent
vbInsideSolid      6      Inside Solid

0
 
LVL 2

Expert Comment

by:swilt
ID: 1464249
Unfortunately the line is unbelivably thin and the DrawStyle is inopperative if the DrawWidth is > 1 so use the following code

Dim i As Integer

Printer.DrawStyle = vbDashDotDot
Printer.DrawWidth = 1
For i = 1 To 8
    Printer.Line (0, 50 + i)-(4000, 50 + i)
Next i
Printer.EndDoc

0
 

Author Comment

by:ga
ID: 1464250
Is there no other way to solve this problem ??
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 2

Expert Comment

by:swilt
ID: 1464251
What was the problem with my answer ? What sort of solution would you like ?
0
 

Author Comment

by:ga
ID: 1464252
Isn't there a single command wich draws the same! lines on any printer.
0
 
LVL 1

Accepted Solution

by:
wizard2072098 earned 50 total points
ID: 1464253
The simple answer is: No, there's no easy way.

If you use a generic print command, you'll get the default for that printer type.

If you want something specific, you gotta code it specific...

Everybody wants EASY, EASY, EASY. If it were really that easy, no software company could stay in business.
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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

929 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