Highlighted
Super Contributor.
Super Contributor.
152 views

Check open form

Jump to solution

I have a form and open a second form2 I want to check if form2 is already open found this statement in C # but could not translate to Cobol "if (Application.OpenForms.OfType <Form2> () .Count ()> 0)"

 

Eu tenho um form e abrir um segundo form2 quero verificar se o form2 já esta aberto encontrei essa instrução em c# mas não consegui traduzir para o Cobol "if (Application.OpenForms.OfType<Form2>().Count() > 0)"

Tanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Check open form

Jump to solution

Try the following:

           declare aform2 as type Form2 = new Form2
           invoke aform2::Show
           if type Application::OpenForms::OfType[type Form2]::Count > 0
               display "open"
           else 
               display "no"
           end-if

View solution in original post

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Check open form

Jump to solution

Try the following:

           declare aform2 as type Form2 = new Form2
           invoke aform2::Show
           if type Application::OpenForms::OfType[type Form2]::Count > 0
               display "open"
           else 
               display "no"
           end-if

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Check open form

Jump to solution

Thank you, Chris

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.