Attachmate.Reflection.Framework Assembly > Attachmate.Reflection.Framework Namespace > Application Class : GetControlByInstanceId Method |
'Declaration
Public Function GetControlByInstanceId( _ ByVal controlInstanceId As Guid _ ) As Object
'Usage
Dim instance As Application Dim controlInstanceId As Guid Dim value As Object value = instance.GetControlByInstanceId(controlInstanceId)
public object GetControlByInstanceId( Guid controlInstanceId )
Exception | Description |
---|---|
System.ApplicationException | The API service can not intialize sucessfully. |
A control's instance ID is guaranteed to be unique. It does not persist in the session configuration file and its value changes between each session instantiation.
private IIbmTerminal terminal; private Application app; app = MyReflection.CreateApplication(); try { terminal = (IIbmTerminal)app.GetControlByInstanceId(new Guid("1517be80-ac73-4a8c-8ec8-602fbf39dcfc")); } catch { Console.WriteLine("Check to make sure the session with controlInstanceId is running."); }