Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Using Application.Run(ApplicationContext) in Visual COBOL

$
0
0

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()
       local-storage section.
           01 context type MgLoad.MyApplicationContext.
       procedure division.
           set context to new type MgLoad.MyApplicationContext
           invoke type Application::Run(context)
           goback.
       end method.

       end class.

  $set ilusing"System.Windows.Forms"
       class-id MgLoad.MyApplicationContext
                inherits from type System.Windows.Forms.ApplicationContext.

       working-storage section.

       method-id MyApplicationContext private.
       local-storage section.
       procedure division.
           invoke type MessageBox::Show("Arrived !")
           *> start up my native menu
           goback.
       end method.

       end class.

I am also uploading the project for this.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>