473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Printer

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
6 1092
"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
"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
Many many thanks for that!!

Nov 21 '05 #4
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
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
Thanks for that!

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrick Herb | last post by:
Hello, I'm trying to print the content of a RichTextBox from my VB 6 app. What I want is that the CommonDialog shows up, the user selects a printer and the content of the RichTextBox prints to...
2
by: Jody Burgess | last post by:
Hi; I am writing my first python program and would like to know how to change stdout to refer to my default printer or any other printer on my network. The other question is, Is there an API set...
7
by: Steve M | last post by:
Hello, I'm having problems sending information from a python script to a printer. I was wondering if someone might send me in the right direction. I wasn't able to find much by Google TIA...
0
by: James Griffiths | last post by:
Here is a report I've written about a printing problem that is being experienced by a particular company for whom I had developed a A97 system. After upgrading to Win XP and AXP, some printing...
0
by: Esmee | last post by:
Hi there, I have created an Access 2002 db which contains several reports. Some reports need to be printed on a Laserjet and others on a Labelprinter. One of my clients wants to be able to print...
1
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
0
by: Mark | last post by:
Hello, I have a VB6 Project that uses an ini file to save selected printer settings for several forms. The program allows users to select the printer on their work station for printing forms. If...
2
by: cjreynolds | last post by:
Please excuse my cluelessness on the subject - this is the first time I've worked with printing in VB (and it may be the last) and the more I work with it, the more confused I become... First, I'm...
4
ADezii
by: ADezii | last post by:
Recently, there seems to be several questions specifically related to Printers and changing Printing characteristics for Forms and Reports. For this reason alone, I decided to dedicate this week's...
9
by: id10t error | last post by:
Hello, I am going to be using a Symbol WT4090 to scan items. I need to printer a tag from the Zebra ql320 plus. I am trying to do this is Visual basic 2005. Does anyone know and good site to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.