InfoConnect for Unisys
Attachmate.Reflection.Framework Namespace / MyReflection Class / Applications Property
Example


In This Topic
    Applications Property
    In This Topic
    Gets all of the InfoConnect .NET API Application objects (Workspaces).
    Syntax
    'Declaration
     
    
    <SuppressMessageAttribute(Category="Microsoft.Performance", 
       CheckId="CA1819:PropertiesShouldNotReturnArrays", 
       Scope="", 
       Target="", 
       MessageId="", 
       Justification="")>
    Public Shared ReadOnly Property Applications As Application()
    'Usage
     
    
    Dim value() As Application
     
    value = MyReflection.Applications
    [SuppressMessage(Category="Microsoft.Performance", 
       CheckId="CA1819:PropertiesShouldNotReturnArrays", 
       Scope="", 
       Target="", 
       MessageId="", 
       Justification="")]
    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