Problems with VB 6.0 App loading .net assembly with own mdi window (message loop)...
-
Our main application is written in vb 6.0. The latest module for this product is written in .net. To accomplish this our .net module expose a COM interface to start and stop the .net module from the vb 6.0 code base. Furthermore the module needs to receive data from the vb application during the session. Otherwise the connection between both is useless. At the moment the .net module is a Inproc COM thing which runs in the same process as the vb app does. At first glance the problem seemed just to be that the Tab key behaved strange. A few tests later we saw that the .net module opens a MDI Form but didn't create a message loop (Application.Run). A few coffees later we fixed that part and the .net module main window was finally running inside a Application.Run(new MdiMainForm()) call. Guess what, the tab problem was fixed... I assume that the vb application message loop wasn't suitable for the .net part of the process ;) I guess it's very strange to have such a constelation inside one process, right? After seeking codeproject I know that the best solution would be to let the module run as an exe in his very own process, OutOfProcess as a COM Server or use one of the IPC solutions (Named Pipe, Remoting WM Messages etc..) This seems all to be very compilcated, all I want is to start/control/stop our .net module by the vb application, any ideas? myMsg.BehindDaKeys = "Jerry Maguire";