Skip to main content

how to create an event handler for a control in .NET

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

A VB application needs to run a COBOL console application in the .NET environment.  Pressing a button on a VB form is required to startup a COBOL Console exe that will accept and display.

Resolution:

One way would be to have a COBOL COM object (a dll) as a proxy between the VB application and the COBOL Console application.  This is the documented method and is the recommended route to take when passing arguments or values between the two languages.

Please refer to the documentation on COM in the Getting Started and Distributed Computing books.

Please note that you cannot accept and display from a COBOL dll.

On the otherhand, you can run a COBOL Console exe directly from the VB with the following statement in the VB code:

System.Diagnostics.Process.Start("the COBOL Console exe file")

Old KB# 5453

0 replies

Be the first to reply!