Skip to main content

I've created a solution as a CLASS LIBRARY (no forms) and dumped in some legacy code which compiled without incident.

The legacy code used to work with a DIALOG screen in order to ask the user to enter an employee number.

I've added a WINDOWS FORM to the solution and added Systems.Windows.Forms and System.Drawing as references to the solution in order to incorporate the form.

In my legacy code I've added the line:

invoke my-empChange::ShowDialog(self)

in order to fire up the form however I'm getting the message: COBCH089: Could not find method 'ShowDialog' with this signature

Which other 'references' & namespaces do I need to incorporate into the solution so that the program will compile & run?

 

 

I've created a solution as a CLASS LIBRARY (no forms) and dumped in some legacy code which compiled without incident.

The legacy code used to work with a DIALOG screen in order to ask the user to enter an employee number.

I've added a WINDOWS FORM to the solution and added Systems.Windows.Forms and System.Drawing as references to the solution in order to incorporate the form.

In my legacy code I've added the line:

invoke my-empChange::ShowDialog(self)

in order to fire up the form however I'm getting the message: COBCH089: Could not find method 'ShowDialog' with this signature

Which other 'references' & namespaces do I need to incorporate into the solution so that the program will compile & run?

 

 

Get rid of the parameter in the ShowDialog method.

The parameter is not required and is only used to specify the owner window of the new form if it is other than the current form.

Since you are currently running in a legacy program and not in a class with type Form, the SELF parameter is invalid here because it will not be the correct type.

Change to the following:

   invoke my-empChange::ShowDialog

Thanks.


I've created a solution as a CLASS LIBRARY (no forms) and dumped in some legacy code which compiled without incident.

The legacy code used to work with a DIALOG screen in order to ask the user to enter an employee number.

I've added a WINDOWS FORM to the solution and added Systems.Windows.Forms and System.Drawing as references to the solution in order to incorporate the form.

In my legacy code I've added the line:

invoke my-empChange::ShowDialog(self)

in order to fire up the form however I'm getting the message: COBCH089: Could not find method 'ShowDialog' with this signature

Which other 'references' & namespaces do I need to incorporate into the solution so that the program will compile & run?

 

 

Very good.

Thank You.