Results 1 to 3 of 3

Thread: How to specify a printer to do Printform (VB6)

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    13

    How to specify a printer to do Printform (VB6)

    Hi, i want to make two ActiveX exe (A, B) to handle 2 different print jobs by two different printers.

    I use the below code to set printer before calling printform

    Private Sub SetPrinter(ByVal PrinterName As String)
    Dim X As Printer
    For Each X In Printers
    Debug.Print X.DeviceName
    If X.DeviceName = PrinterName Then
    Set Printer = X
    Exit For
    End If
    Next
    End Sub

    Both Server A and B are singleuse instancing and keep runing, I am concerning a situation where the time of server B set the printer is just after Server A set its printer, Will the print job of Server A send to the printer that is set by Server B? if so, how can i specify a pritner to do the printform method?
    Thanks~~

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to specify a printer to do Printform (VB6)

    I'm curious as to why you would want to make these ActiveX. Your VB program could run that code just as easily.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    13

    Re: How to specify a printer to do Printform (VB6)

    sine there are two different long process need to handle before printing.
    I'm making a carpark system, one activeX exe handles all the events and print a ticket for entrance, another handles the events for exit and receipt printing. So i want to make sure the ticket will print at the entrance's printer (by printform method as i got the design) and exit printer for printing receipt.

    Thanks for your help~
    Last edited by ryukkl; May 22nd, 2007 at 12:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width