Results 1 to 3 of 3

Thread: Help with VB App to Install Network Printer

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    4
    In need to get a list of printers that are available on a print server (i.e. net view \\servername) and have VB be able to show the list in a listbox/textbox.

    Hope you can help!

    Chad

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Galway, Ireland
    Posts
    316
    Is not very nice but a quick way would be to do this

    shell("net view \\server > c:\nnn.txt")
    Open "c:\nnn.txt" For Input As #1
    do while not eof(1)
    Line Input #1, linedata
    t_pos = InStr(1,linedata," Print ")
    if t_pos <> 0
    combo1.add trim(left(linedata,20))
    endif
    loop

  3. #3
    Lively Member
    Join Date
    Jan 2000
    Location
    UK
    Posts
    66
    Take a look at an excellent piece of code at:

    http://www.mvps.org/vbnet/code/enums/enumprinters.htm

    Hope this helps

    Simon

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