Showing message boxes / progess info from within legacy code..

A great number of our programs we're currently converting from our old DIALOG system contain simple calls to a dialog panel in order to show progress of the application by way of employees processed, name of employee being processed etc etc.

The programs that contain these 'snippit calls' to dialog are large and are doing the bulk of the processing. To this end we want to keep these as 'legacy programs' and make calls to them from the .net screen programs wherever possible.

As such these 'legacy' programs are compiled into the solutions as class library programs but with all the code being 'old' as in using perform statements as opposed to invoke etc.

Is there a way of including call outs to a message box from within these 'legacy programs' using data passed to them in order to continue to show the data as it is processed as, at the moment, when I attempt to put code such as "invoke type System.Windows.Form.MessageBox(xxxx" within the legacy code itself I just get a pile of errors.

  • Verified Answer

    If these legacy procedural programs are compiled as managed code then you can use the MessageBox class directly from them but you will have to add the correct assemblies to the project references.

    Please see this previous post which covers the details of this task.