Skip to main content

Check open form

  • January 15, 2020
  • 2 replies
  • 0 views

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

2 replies

Chris Glazier
Forum|alt.badge.img+2

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

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

  • January 15, 2020

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

Thank you, Chris