By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,806 Members | 1,345 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,806 IT Pros & Developers. It's quick & easy.

Printer

P: n/a
Hi all! I have a printer attached to my PC, and I share it to my LAN.
The problem is how can I know which computer print the document, and
how many pages they printed by using VB .Net! Thanks!

Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies

P: n/a
"Stanley" <xs******@gmail.com> schrieb:
I have a printer attached to my PC, and I share it to my LAN.
The problem is how can I know which computer print the document, and
how many pages they printed by using VB .Net!


Sime pointers:

WMI + 'Win32_PrintJob' (properties 'HostPrintQueue', 'Owner').

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

P: n/a
"Stanley" <xs******@gmail.com> schrieb
Hi all! I have a printer attached to my PC, and I share it to my
LAN. The problem is how can I know which computer print the
document, and how many pages they printed by using VB .Net! Thanks!

http://msdn.microsoft.com/library/en...tspol_62ia.asp
Armin
Nov 21 '05 #3

P: n/a
Many many thanks for that!!

Nov 21 '05 #4

P: n/a
I still have some problem please help me! The problem is that when I
try to do WQL
"SELECT * FROM Win32_PrintJob" in a do-loop thread, it eat nearly 10%
of my CPU! So is there away to do the WQL statement when needed? Ex:
only when printer has activity! Thanks

Nov 21 '05 #5

P: n/a
Stanley,

Mostly is it sufficient to set a sleep in the loop.
threading.thread.sleep(1000), which means 1 second.

http://msdn.microsoft.com/library/de...SleepTopic.asp
I hope this helps.

Cor
Nov 21 '05 #6

P: n/a
Thanks for that!

Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.