?
Solved

Print dotted-lines

Posted on 1998-06-25
6
Medium Priority
?
298 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 150 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

801 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