Results 1 to 2 of 2

Thread: Network printing...

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    5

    Network printing...

    I am on an active directory network, and I want to print to my network printer on cheesesvr -- The ip of the printer is 192.168.56.4 -- How would I go about printing the end variable?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Network printing...

    I'd use a combobox to select printers, as the common dialog control has problems. I do this in the form_activate, to select the default printer.

    VB Code:
    1. Combo1.Clear
    2.   For Each prt In Printers
    3.     Combo1.AddItem prt.DeviceName
    4.   Next prt
    5.   For x = 0 To Combo1.ListCount
    6.     If Combo1.List(x) = Printer.DeviceName Then
    7.       Combo1.TopIndex = x
    8.       Combo1.ListIndex = x
    9.       Exit Sub
    10.     End If
    11.   Next x

    and then this, to change it:

    VB Code:
    1. Private Sub Combo1_Click()
    2.   Dim p As String
    3.   Dim prt As Printer
    4.   p = Combo1.List(Combo1.ListIndex)
    5.   For Each prt In Printers
    6.     If prt.DeviceName = p Then
    7.     Set Printer = prt
    8.     End If
    9.   Next prt
    10. End Sub

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