• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

in VB6 picking the the output bin on a laserprinter

I have 2 different output bins to collect my paperoutput
How to call in VB6 either output bin 1 or output bin  2
0
BIAPRO
Asked:
BIAPRO
  • 6
  • 6
1 Solution
 
David RobitailleAnalyst ProgrammerCommented:
ther is a Printer.PaperBin  property that you could set.
check the link for a list of the PrinterObjectConstants that you could use to set it.
http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.powerpacks.printing.compatibility.vb6.printer.paperbin.aspx
0
 
BIAPROAuthor Commented:
do i have do install something from microsoft?  just like that i cant run it
0
 
David RobitailleAnalyst ProgrammerCommented:
no, you should not have to install something for microsoft.
how are you printing? do you use vb.printer ?
this work ok with me.
VB.Printer.PaperBin = vbPRBNUpper
 
here a article series about printing with VB using printers objects, do you print using something else?
http://www.devx.com/getHelpOn/10MinuteSolution/18219/0/page/1 
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
BIAPROAuthor Commented:
This will set my input bin form wich tray to get the paper, what i do need is how to set the output bin (receiver of printed paper)
0
 
David RobitailleAnalyst ProgrammerCommented:
ho i see,
you could try using "VBPrnDlg.dll"
http://support.microsoft.com/kb/322710
It offer extended possibility. if you dont need to set the output bin form the code it should be a solution.
If you do need to set the output bin form the code, I`m not sure it will help...
 
0
 
BIAPROAuthor Commented:
in old day's of qbasic i did this
lprint chr$(27) + "&l" +  "1G"               '1 for lowerbin 2 for upperbin
plain simple
0
 
David RobitailleAnalyst ProgrammerCommented:
it`s becaus you are sending the "command" directly to the printer, it`s something printer driver specific....
anyway, did you try ?
VB.Printer.Print  chr$(27) & "&l" &  "1G"
   
0
 
BIAPROAuthor Commented:
Wil try , but not in the neiberhood off this printer now, keep you informed, thanks
0
 
David RobitailleAnalyst ProgrammerCommented:
i made a quick search for you. It look like your printer is a HP printer.
http://beechglen.com/pcl/hppcl.html
Anyway, if VB.Printer.Print does not work, you will have to find a way to write directly on the printer. Here a link, this guy is trying to migrate code form vb6 to vb.net. he commented out some of his old code.
http://social.msdn.microsoft.com/Forums/en-US/vbinterop/thread/facd6440-b4b6-4f5d-ae0c-689fb0ce4c15/
it look like he putting the binary data he want to print into a file and then using cmd.exe to copy the file directly on the print server (i guess Dcpp100 is a print server).
"cmd.exe /C Copy /b """ & FName & """ \\Dcpp100\" & sPrinter
 
 (/b is binary mode)
I hope that will help
0
 
BIAPROAuthor Commented:
looks pretty logical will play with this, thanks
0
 
David RobitailleAnalyst ProgrammerCommented:
using copy is only one possibility.
you may also try to do it using the open #fileNumber and Print/ or Write#.
if you are able to open the printer for writing as a file, you may be able to write on it as a file...
 
 
0
 
BIAPROAuthor Commented:
will try, thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now