Solved

PICK A PRINTER OUT OFF MANY AT RUNTIME

Posted on 2004-09-21
2
174 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Title # Comments Views Activity
Help to convert powershell script into a gui 9 199
C# Error - Add Failed 12 94
Query Syntax 17 43
batch file or script 4 28
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …

821 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