bobdylan75
asked on
c# exeption error on PrinterMonitorComponet.
Hi,
I'm using PrinterQueueWatch (open suorce library)
but at runtime it gives me an exception
not specified on creation of new object PrinterMonitorComponent.
(where there are >>>>>>>>>>>>>>>)
why?
see code attached
I'm using PrinterQueueWatch (open suorce library)
but at runtime it gives me an exception
not specified on creation of new object PrinterMonitorComponent.
(where there are >>>>>>>>>>>>>>>)
why?
see code attached
try
{
PrinterMonitorComponent Monitor = new PrinterMonitorComponent();
Monitor.MonitorJobAddedEvent = false;
Monitor.MonitorJobDeletedEvent = false;
Monitor.MonitorJobSetEvent = true;
Monitor.MonitorJobWrittenEvent = false;
Monitor.MonitorPrinterChangeEvent = false; >>>>>>>>>> Monitor.JobSet += new PrinterMonitorComponent.PrintJobEventHandler(SetPrintJob);
Monitor.DeviceName = PrinterName;
}
catch (Exception ex) { Console.WriteLine(ex.Source.ToString()); };
Prt_Proc.Start();
//Prt_Proc.WaitForExit();
int Timeout=180;
do
{
System.Threading.Thread.Sleep(1000);
Timeout-=1;
} while(Timeout > 0 && !Prt_Proc.HasExited);
//Monitor.JobSet -= SetPrintJob;
////Prt_Proc.CloseMainWindow();
return true;
}
I don't know that component. The description of the exception doesn't make sense. Can you attach the full stack trace for the run-time exception?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok