Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How to call a second windows form from a first Windows form in a .NET Framework Application

How to call a second windows form from a first Windows form in a .NET Framework Application

Problem:

How to call a second windows form from a first Windows form in a .NET framework application.

Resolution:

Assuming the Visual COBOL for Visual Studio .NET framework windows form application, has a second form called Form2 - call this Form2 Window by using code as follows:

declare myform2 as type call2ndform.Form2 = new call2ndform.Form2

invoke myForm2::Show() 


This declares a new object called myform2 which then can use the inherited properties and methods.

In this case, the Show() method which opens the Windows Form.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2016-04-05 11:35
Updated by:
 
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.