Admin Production rocket
Current Publication

Applications Property

InfoConnect Desktop InfoConnect .NET API Guide V18.0.1
Rocket® InfoConnect Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation that was created prior to Rocket Software's acquisition of certain products from OpenText may contain outdated references to "Micro Focus” or “OpenText”, which are trademarks of OpenText. Rocket Software is not affiliated with Micro Focus or OpenText and has rebranded these products as Rocket® products.
Applications Property
In This Topic
Gets all of the InfoConnect .NET API Application objects (Workspaces).
Syntax

                     
                     
'Declaration
 

                     
                     
Public Shared ReadOnly Property Applications As Application()

                  

                     
                     
'Usage
 

                     
                     
Dim value() As Application
 
value = MyReflection.Applications

                  

                     
                     
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