Greetings. Thank you for an excellent piece of software! Just what I needed to help get a project done, and I can see a lot of further potential for it.
The component works well in terms of the functionality I need but there is one annoying issue that much tinkering has not solved.
As soon as I begin to use the component, i.e. add a printer to the monitor list, then when I subsequently close my program, its process refuses to die gracefully.
The UI vanishes as expected but the oprogram is still in Task Manager's process list. I can kill it there, but obviously something is not right. And in the IDE running in debug mode, closing the form does not return to editing mode. I have to force
it to stop debugging.
I have this code in the form closing event handler:
Private Sub frmMain_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Catch ex As Exception
MsgBox("Error disposing of PrinterMonitorComponent : " + ex.Message, MsgBoxStyle.Exclamation, "Close-down error")
Elsewhere I explicitly remove montitored printers from the monitor list, as not doing so caused an exception. Now I don't get exceptions, just stuck in memory.
We have quite a complex printing environment here but I can reproduce the problem at home in a fairly clean VM in a fairly trivial network.
I don't get the problem if I quit just before adding a printer to the monitor.
In both cases it's VB Express 2005 (.Net 2) running on plain old 32-bit XP.
I tried to get the trace working to look for clues but didn't manage to obtain a log file.