Print Event Capture

1

Good afternoon,

I would like to know how do I capture the print event using C #.

Example: the user clicks on the option to print the application that he is using (Word, Outlook etc ...) and instead of calling a printer would open a form, which I will develop.

I want to handle the information, save it to a database, and send that print to a server.

Thank you

    
asked by anonymous 22.04.2015 / 00:14

1 answer

2

I believe this is what you are looking for FindFirstPrinterChangeNotification function

C ++ Syntax:

HANDLE FindFirstPrinterChangeNotification(
  _In_      HANDLE hPrinter,
  DWORD fdwFilter,
  DWORD fdwOptions,
  _In_opt_  LPVOID pPrinterNotifyOptions
);

DLL Usage:

[DllImport("winspool.drv",
    EntryPoint = "FindFirstPrinterChangeNotification",
    ...)]

An example usage:

Monitor jobs in a printer queue (.NET)

Source: link

    
22.04.2015 / 05:16