Solved

PICK A PRINTER OUT OFF MANY AT RUNTIME

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

726 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