I have a couple of applications that depend on each other. One is a robust vb6 application. The other is my eagerly anticipated, stealth technology employing, and likely oscar winning .net (2.0) systray application. The vb6 app starts the systray app. And if the VB6 app is shut down, the systray app will shut itself down assuming it has no other work to do (it's work is saving documents to a database).
My sole remaining concern is what happens if the systray app crashes or cannot do its work due to some fatal error. A likely outcome of this condition is me popping up a modal dialog telling the user "contact support immediately, because you can't save documents any more".
I think the worst case scenario here is that whenever a document is processed in the vb6 app (that is, a user completes the document and it's components are zipped up and saved locally), I'll just have to check and see if the systray app is running. I don't know, that seems a bit cumbersome. Is there a more elegant approach? Is there some way I can "signal" my vb6 app/have my vb6 app listen for such a signal?
what I have done in the past is a class library in .NET exposed as COM object (in the assembly info, put ComVisible attribute to true).
This way from VB6 you can call the methods you have exported from .NET class library and in C# you can have all the code you need to handle the situation.
In this way I write less code in VB6 and more in C# where we can profit of better exception handling (try-catch-finally), logging frameworks like Log4Net and so on...
this has worked very well for me so far.