Solved

Print dotted-lines

Posted on 1998-06-25
6
258 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
Comment Utility
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
Comment Utility
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
Comment Utility
Is there no other way to solve this problem ??
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 2

Expert Comment

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

Author Comment

by:ga
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

744 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

12 Experts available now in Live!

Get 1:1 Help Now