|
-
Mar 30th, 2000, 03:10 AM
#1
Thread Starter
New Member
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
-
Mar 30th, 2000, 10:56 PM
#2
Hyperactive Member
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
-
Mar 31st, 2000, 01:08 AM
#3
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|