I have a VB6 project compiled as a VB6 exe.
It has a simple form as its startup object.
It launches a .NET modal form via a regasm'd .NET dll, passing it an implementation of a callback COM interface (IHandler).
.NET calls back to the IHandler implementation in VB6.
VB6 tries to show a new form using vbModal. The VB6 form is blocked from interaction because of the modal .NET form which is still visible.
Is there any way around this or a suggested approach?
I tried calling back to VB6 on a new (STA) (managed) thread, but when it tries to do MyCallbackForm.Show vbModal, I get "Invalid procedure call or argument."...which I assume has to do with the fact that I'm calling back on a new thread...
Update: I WAS able to successfully make a callback on the new thread and show my VB6 form modally IF I set my VB6 project type to ActiveX exe...but once I did that, I seemed to lose the thread on the callback - making subsequent calls from VB6 to .NET resulted in a cross threading exception. I'm guessing this has to do with the threading model when using ActiveX exe....