We have a hybrid application that runs both native and managed functions from a native menu. The first program run is managed. I want to start a message loop in this program then show each managed form with the Form::Show() method. When I execute Application..Run(ApplicationContext) in the debugger the output window displays "Step into: Stepping over non-user code 'System.Windows.Forms.Application.ThreadContext.ThreadContext'" and it just hangs.
This is my code:
class-id. Mgload as "Mgload.Mgload".
method-id Startup static attribute STAThread()
01 context type MgLoad.MyApplicationContext.
set context to new type MgLoad.MyApplicationContext
invoke type Application::Run(context)
inherits from type System.Windows.Forms.ApplicationContext.
method-id MyApplicationContext private.
invoke type MessageBox::Show("Arrived !")
*> start up my native menu
I am also uploading the project for this.