Highlighted
Absent Member.
Absent Member.
1427 views

Adding a form to a Legacy code solution?

Jump to solution

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?

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Adding a form to a Legacy code solution?

Jump to solution

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.

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Adding a form to a Legacy code solution?

Jump to solution

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.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Adding a form to a Legacy code solution?

Jump to solution

Very good.

Thank You.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.