المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Why Printing events not fired



C# Programming
05-20-2009, 05:11 PM
when we give the print from internet explorer,
any of the Printing events are not fired?
Why? This was the code I'm trying with


System.Drawing.Printing.PrintDocument Pd = webBrowser.Document as System.Drawing.Printing.PrintDocument;
Pd.Print();
Pd.BeginPrint += new System.Drawing.Printing.PrintEventHandler(Pd_BeginPrint);
Pd.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(Pd_PrintPage);
Pd.EndPrint += new System.Drawing.Printing.PrintEventHandler(Pd_EndPrint);


Here webBrowser gives the Internet Explorer reference?
How can I get these events get fired?