Walkthroughs > Add the Terminal User Control > Embed Terminal User Controls |
The InfoConnect Terminal User Control (TUC) can be embedded in your Windows applications to provide a terminal screen on a Windows form along with another application or a different data source. This control renders a terminal emulator session within a given windows form application.
You can also embed InfoConnect Terminal User Controls on Windows Presentation Foundation (WPF) applications.
![]() |
Note: You can use the InfoConnect Terminal User Control with Visual Studio 2013 targeted to .NET 4.5.1 or with Visual Studio 2010 targeted to the .NET 4.0 framework (or higher .NET versions supported by Visual Studio 2010). When creating applications on a 64-bit machine and using a InfoConnect Terminal User Control, make sure the application target is set to "x86" instead of "Any CPU" or "x64". This is required because a 64-bit application does not work directly with 32-bit controls. If the build target (Platform) is not set to "x86", the "COMException: class not registered" error is displayed during runtime. |
Note: The required assemblies are automatically added to the project references after you add the control to the form.
private void Form1_Load(object sender, EventArgs e)
{
ibmTerminalControl1.InitInstance(Attachmate.Reflection.UserControl.IbmHosts.HostType.IBM3270);
}
private void ibmTerminalControl1_TerminalInitializedEvent(object sender, AsyncCompletedEventArgs e)
{
ibmTerminalControl1.IbmTerminal.HostAddress = "zos.efglobe.com";
ibmTerminalControl1.IbmTerminal.Port = 23;
ibmTerminalControl1.IbmTerminal.Connect();
}
private void Form1_FormClosing(Object sender, FormClosingEventArgs e) { ibmTerminalControl1.IbmTerminal.Close(Attachmate.Reflection.CloseOption.CloseNoSave); ibmTerminalControl1 = null; }
![]() |
Note: You may see the following compiler warning: |
Note: The required assemblies are automatically added to the project references after you add the control to the form.
private void Form1_Load(object sender, EventArgs e)
{
openSystemsTerminalControl1.InitInstance();
}
using Attachmate.Reflection.Emulation.OpenSystems;
private void openSystemsTerminalControl1_TerminalInitializedEvent(object sender, AsyncCompletedEventArgs e)
{
ITerminal Terminal = openSystemsTerminalControl1.Terminal;
((IConnectingSettingsBestNetwork)Terminal.ConnectionSettings).HostAddress = "yourHostName";
Terminal.Connect();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { openSystemsTerminalControl1.Terminal.Close(Attachmate.Reflection.CloseOption.CloseNoSave); openSystemsTerminalControl1 = null; }
![]() |
Note: You may see the following compiler warning: |