I was wondering if someone has had a similar situation. We have a legacy VB6
application that is fairly large. We'd like to write new code in C# and have
it launched from the VB6 application so it looks, at least, like a child
module. We looked at seeing if we could host a C# control as an ActiveX
control and found that wouldn't work and it was an unsupported "feature". So
we are looking at just "shelling" from VB6 to the C# applicatoin and sending
it the minimal info it needs through command arguments. This works. We can
launch the application. Question comes in, when the "parent" (the VB6
applicaiton) is shut down, how can we enforce a shutdown of the C#
applicaiton? Further complicating this is that multiple "sessions" can be
launched of the VB 6 app, so we're really talking about the window that
launched the C# app, not the applicaiton name itself.
I'd rather not get into something hokey like writing a file out that says
"I'm closed" and having that notify the C# app (plus we'd have to register
the Hwnd to make sure and how would we differentiate different files -- how
do you cleanup the files when you're all done? etc.)
Would love to do some windows messaging, but not finding a lot to help
exactly. This is a client applicaiton written in VB6, trying to "talk" to a
C# applicaiton on the same machine. It would be nice to just broadcast a
message out from the parent that it's shutting down and have the C# app
respond to that message. Is that possible?
What other options are there to do this elegantly?
Todd