Solved

PICK A PRINTER OUT OFF MANY AT RUNTIME

Posted on 2004-09-21
2
172 Views
Last Modified: 2010-04-17
I'am  rewriting dos programs to VB6

In Windows,  but a DOS program in a DOS-box I did in one program
wich prints at same time:
 
   2  laserforms,
   1 matrixform,

Situation on one workstation:
'===================
We just had the Matrix as default printer in Windows on Lpt1,
end the Laser as other printer on Lpt2 poort,
Plus they are set as sharable

then in the program all matrix output was printed to LPT1
and laseroutput to LPT2,
How is syntax if I do the same in VB6

Then on other stations:
===============
We put matrix to sharable on LPT1 same on sharable LPT2

Then on some stations:
===============
Since we run on a Novell network 3.20
we have 2   printservers  with 3 lpt ports

    SELECT CASE PrinterChoice%
     CASE 1
     TEXT$ = "DOWNST01"
     CASE 2
     TEXT$ = "DOWNST02"
     CASE 3
     TEXT$ = "DOWNST03"
     CASE 4
     TEXT$ = "UPSTAIR01"
     CASE 5
     TEXT$ = "UPSTAIR02"
     CASE 6
     TEXT$ = "LOCAL"
 END SELECT


    SHELL "CAPTURE /NB /TI=3  /NFF /Q=" + TEXT$

How would I do all this if I start same programs in VB6














 
0
Comment
Question by:BIAPRO
2 Comments
 
LVL 2

Accepted Solution

by:
Parsi earned 500 total points
ID: 12149714
Hi BIAPRO

Are you using Crystal Report? If yes this can help you
Cr1.PrinterDriver = ...
Cr1.PrinterName = ...
Cr1.PrinterPort = "LPT1"

for finding out PrinterDriver you ca have something like this.

dim P as printer
dim x as string
for each P in printers
  if AConditionSatisfies
    x=P.printerdriver
  endif  
next

So u can use x for prinerdriver.

Good luck
Parsi
0
 

Author Comment

by:BIAPRO
ID: 12170490
No crystall reports (yet), so I will try second suggestion
Jack
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

Suggested Solutions

Title # Comments Views Activity
allStar challenge 1 52
word0 challenge 3 78
White board coding practice 3 78
How to obtain Administrator permission when you are the Administrator 6 62
A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

911 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

16 Experts available now in Live!

Get 1:1 Help Now