Solved

PICK A PRINTER OUT OFF MANY AT RUNTIME

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

706 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

20 Experts available now in Live!

Get 1:1 Help Now