Solved

Print dotted-lines

Posted on 1998-06-25
6
286 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

749 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