borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Thanks but ...)Next Topic (Printing with VB Script) New Topic New Poll Post Reply
AndreaVB Forum : Printing : How to know when a printing is started
Poster Message
supera
Level: Guest


icon How to know when a printing is started  Archived to Disk

Hi,
Please I would like to know when a printing is started...
Does it exist a function which can inform me when a printing is started since any application?
Please, I need your help.
Thanks in advance.

06-07-2002 at 06:04 PM
| Quote Reply
Merrion
Level: VB Guru

Registered: 15-04-2002
Posts: 37
icon Re: How to know when a printing is started  Archived to Disk

The solution depends on which operating system you are running.  

* If you are running Windows 95/98/Me then you need to subclass your application's main form and intercept any WM_SPOOLERSTATUS messages sent to it.

* If you are running Windows NT/2000/XP you need to create a waitable object using FindFirstPrinterChangeNotification then WaitForSingleObject and FindnextPrinterChangeNotification API calls.

In both cases you can read the print queue for your printer as per the code in this article

HTH,
  Duncan

____________________________
--8<------------------------------
Free components and source code - see http://www.merrioncomputing.com/Download/index.htm for details

09-07-2002 at 08:41 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Printing : How to know when a printing is started
Previous Topic (Thanks but ...)Next Topic (Printing with VB Script) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder