如何以VB6表单从C#用户控件处理事件



i具有通过COM Interop暴露的C#用户控件,并由VB6表单托管。在VB6表单中,如何检测用户何时单击用户控件中的关闭按钮,以便我可以关闭VB6表格?

我想,因为您以这种方式调用它作为单独的过程运行?

无法将事件添加到该过程后的任何过程中捕获时捕获的内容?

process.EnableRaisingEvents = true;
process.Exited += (sender, e) => {  /* do whatever you need to when it closes, i.e. remove the user control or close its parent form. */ };

最新更新