Admin Production rocket
Current Publication

Applications Property

InfoConnect Desktop InfoConnect .NET API Guide V17.0
Rocket® InfoConnect Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
Applications Property
In This Topic
Gets all of the InfoConnect .NET API Application objects (Workspaces).
Syntax

                     
                     
'Declaration
 

                     
                     
<SuppressMessageAttribute("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")>
Public Shared ReadOnly Property Applications As Application()

                  

                     
                     
'Usage
 

                     
                     
Dim value() As Application
 
value = MyReflection.Applications

                  

                     
                     
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public static Application[] Applications {get;}

                  

Property Value

An array of InfoConnect .NET API Application objects (Workspaces).
Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Attachmate.Reflection.Framework;
using Attachmate.Reflection.Emulation.IbmHosts;
using Attachmate.Reflection.UserInterface;
using System.Drawing;

namespace ConnectToActiveApp
{

    class MyApplication
    {


        static void Main(string[] args)
        {

            //Get all of the applications running on the system
            Application[] apps = MyReflection.Applications;

            if (apps.Length > 0)
            {
                //make all of the applications visible
                foreach (Application app in apps)
                {
                    IFrame frame = (IFrame)app.GetObject("Frame");

                    //frame.CreateView(terminal);

                    if (frame.Visible == false)
                    {
                        frame.Visible = true;
                    }
                }

            }

            Console.ReadLine();
        }
    }
}

See Also