PrintDialog: Customize for ALL apps

  • Thread starter Thread starter a
  • Start date Start date
A

a

Not sure where to post this question.

I need to make a change to the standard PrintDialog, or have another form
popup along with it. I need to track the 'client to be billed' for each
print job, along with number of pages. One solution I see would be to
change the standard box, so when a user clicks Print in any app, they are
presented with a dropdown list of clients, and a record is added to a DB
with the selected client and the number of pages.

Another method may be to 'intercept' windows messages headed to a
printer????

Can someone guide me in the right direction here? I write in VB (VB.NET).


Thanks!

Kevin
 
I know this is not exactly what you asked, but allow me to explore another
option, possibly with less dependencies:

How about you prompt the user for a billing account before the printout
(like in PrintDocument.BeginPrint event) and count the pages in PrintPage
event, storing the record at EndPrint?

Ori
 
That would work for any app I write. . . . but I need a solution for any
print job (Word, Excel, etc.)
I see now that I wasn't clear about that in my first post.

Is there a way to solve this issue using vb.net?


Kevin
 
Hi Kevin,

If I understand your question correctly, you need monitor the printer job
in your system, and account for the pages printers for every user.

You may take a look at the WMI events, we may get an Event when a printer
job was added to the print queue.

I found a link which gives an small sample on how to get the WMI events in
C# , you may try it to see if it could resolve your problem.
http://www.dotnet247.com/247reference/msgs/44/224530.aspx

Since I'm not an expert in WMI programming, you may ask post WMI issues, in
group microsoft.public.win32.programmer.wmi for further help.

Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
Back
Top