ActiveZTERM Information


Updated December 16, 1998

What's Here?

  Introduction - find out all about ActiveZTERM
  Activate you host applications! AMOS, Unix and everyone else
  Sample Visual Basic application
  ActiveZTERM running in Internet Explorer
  Simple Visual Basic applet that shows SYSTAT in a window 
  Requirements for ActiveZTERM
  Programatic Interface - Properties, Methods and Events
  Download your evaluation version today!

Introduction

Since it's introduction, ZTERM for Windows has become a very popular terminal emulator for linking Windows-based PCs and host systems running AMOS and Unix. With the release of ActiveZTERM, COOL.STF is taking host and Windows communications one step further by providing tried and trusted terminal emulation in ActiveX format. With ActiveZTERM, host applications can be shown and even scripted directly from any ActiveX container, including Visual Basic, Internet Explorer, most Microsoft Office applications and hundreds of other Windows applications and development languages.

With ActiveZTERM, a one line PRINT statement in your host code fires events in Visual Basic allowing you to easily add Windows capability to your host applications. With ZTERM's SendToHost method and a simple INPUT statement on the host, you can acheive bi-directional communications between the two systems. It's really that simple!

The developer licence for ActiveZTERM comes with many samples of how to use ActiveZTERM in source format. With this code base, you can write your own custom terminal emulator and additionally get incredibly simple, yet very versitile connectivity between Windows and your host application!

Activate your AMOS applications

Various attempts have been made in the past to connect AMOS and the PC easily, however, none of them have been a hit. We believe the following things were wrong with these attempts:

Product Problem
AlphaNET/PC Required assembler interface on both the PC and AMOS. Used the terrible AlphaNET protocol which would fail under even perfect conditions. DOS technology.
inSight/am Only extensible on the PC with C/Win16 knowledge. No longer developed. 16-bit technology.
AlphaDDE Very difficult to get working perfectly all the time. Strange interface on the PC with very little support outside of Visual Basic. 16-bit techology.

Alpha Micro's latest TAME interface for AlphaTCP is with out a doubt their best effort yet, however, like AlphaDDE you have a ton of work to do on both AMOS and Windows in order to get any results using these tools and the code you write has to be special background code that can prove very difficult to debug, especially with AlphaBASIC's primative debugging tools (i.e. a PRINT statement!). Additionally, all these tools are unique to the AMOS so if you develop both for AMOS and Unix, these solutions are non-starters.

Activate your Unix applications

Sure, you could use X-Windows, but the difference between writing code X versus for terminals and terminal emulators is huge and often an enhanced terminal emulation is more appropriate than a fully blown GUI. With ActiveZTERM you can run your host application and enhance it with many of the services that Microsoft Windows offers. Also keep in mind that Wintel machines are quite a bit cheaper than X display systems.

Also be assured that if you change your Unix platform, none of your custom Windows code has to change - true cross platform code that hosts your application on Windows 95, Windows 98 and Windows NT 4.0.

Activate any host-based application

Don't use AMOS or Unix? No problem, provided your host application can send escape sequences to a terminal emulator, you too can benefit from ActiveZTERM. ActiveZTERM supports ANSI, Alpha Micro AM62A & AM62C, Contemporary Cybernetics CY-350, Wyse-350 and VT-100 emulations. If you need another emulation, drop us a line.

Sample Visual Basic Program

The following shows a custom Visual Basic program using ActiveZTERM and the source code to the program. As you can see, the VB program is very simple - virtually all the work is handled inside ActiveZTERM.

Private Sub Connect_Click()
    Screen.MousePointer = vbHourglass
    ZTermAX1.Hostname = Hostname.Text
    ZTermAX1.Connect
    ZTermAX1.SetFocus
    Screen.MousePointer = vbDefault    
End Sub
Private Sub Disconnect_Click()
    If ZTermAX1.Connected = True Then ZTermAX1.Disconnect
    ZTermAX1.SetFocus 
End Sub
Private Sub Copy_Click()
    ZTermAX1.Copy
    ZTermAX1.SetFocus    
End Sub
Private Sub Paste_Click()
    ZTermAX1.Paste
    ZTermAX1.SetFocus    
End Sub
Private Sub Form_Load()
    ZTermAX1.Emulator = "AM62C.DLL"
    ZTermAX1.StartZTERM
    Me.Move Me.Width / 2, Me.Height / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)    
    If ZTermAX1.Connected = True Then
        If MsgBox("Sure you want to quit?", vbYesNo + vbQuestion, "ActiveZTERM") = vbNo Then
            Cancel = True
            ZTermAX1.SetFocus
            Exit Sub
        End If
        ZTermAX1.Disconnect
    End If
    ZTermAX1.StopZTERM
End Sub

Running in Internet Explorer

Imagine the possibilities of integrating your Intranet or even the Internet with your host based application! Take a look below to see the Java Script code to make ActiveZTERM run inside IE 3.x or 4.x.

<OBJECT ID="ZTermAX" CLASSID="clsid:6A838C03-B49F-11D1-B3A2-008048B9855A"
WIDTH="550" HEIGHT="400" ALIGN="MIDDLE" NAME="ZTerm">
</OBJECT>
<SCRIPT><!-- 
	function DoConnect()
	{
		ZTerm.Emulator = "AM62C.DLL";
		ZTerm.StartZTERM();
		ZTerm.HostName = hostname.value;
		ZTerm.Connect();
	}
--></SCRIPT>
<P>Hostname:
<INPUT NAME="hostname" TYPE="text" SIZE="25" MAXLENGTH="100" VALUE="208.22.57.35">
<INPUT NAME="ConnectButton" TYPE="submit" VALUE="Connect" onClick="DoConnect()">

SYSTAT running in a window

Although ActiveZTERM can show the host interface, this functionality isn't mandatory - just set ActiveZTERM's Visible property to False and run your host application with a Windows interface!

This screen shot shows a very simple Visual Basic applet that uses a hidden copy of ActiveZTERM to connect to AMOS, run the SYSTAT command and then display the results in a VB form. For those of you not familiar with AMOS, the SYSTAT program shows system status including all the tasks running on the system along with free space information for mounted disks.

Requirements for ActiveZTERM

In order to run, ActiveZTERM requires the following components:

ActiveZTERM can be licensed in three different ways:

Single Copy Licensed with an unlock code scheme. Contains all of ZTERM for Windows' terminal emulations and can connect to any host
Host License Available as a digitally signed cabinet file for automatic installation into containers like Microsoft Internet Explorer. Contains one emulation DLL and is hardcoded to connect to a particular host by either hostname or IP address. Includes royalty-free distribution rights.
Development License Includes five email technical support incidents for programming issues related to ActiveZTERM and a total of three unlock codes for the developer and two in-house machines for qualification purposes. A developer license is required for each member of the development project.

Programatic Interface

These are the properties, methods and events that ActiveZTERM currently has implemented.

Properties  
AlternateEndKey Toggles special alternate End key processing. When set to False, sends a ^E when the End key is pressed and when set to True, sends ESC 0xdf (7-bit) and SOH 0xdf (8-bit).
AutoWrap  Toggles automatic line wrap at either 80 or 132 columns.
BGColor Sets the background color used for the host display. Only used with monochrome emulators.
BorderColor  Sets the color used for the border that gets drawn when switching between 80 and 132 column modes
BrightenLowIntensity Toggles automatic brightening of low intensity text
CaptureHost When set True, fires the HostCapture event as data is received from the host.
ColorEmulator Signals if the currently loaded emulator is a color or monochrome emulation.
Connected Signals that a connection is established with the host.
DisablePrinting  Disables the passthrough printer emulator
DisplayErrors  When set True, shows unknown escape sequences in the emulation window
DotMatrix10CPI (This should probably be removed)
Emulator Selects the emulator that ActiveZTERM loads when the StartZTERM method is used.
FGColor Sets the foreground color used for the host display. Only used with monochrome emulators.
FastDisplay  Enables fast display mode
FontSize Sets the font size used to display the emulation characters. Valid range 0 to 3.
ForceUpperCase  When set True and Caps Lock mode is enabled, forces upper-case characters, even if the Shift key is held down.
Hostname Sets the hostname or IP address of the host system.
IdealHeight Returns the ideal control height for the currently selected font (under development)
IdealWidth Returns the ideal control width for the currently selected font (under development)
InvertPrintScreenColors When set True, causes the print screen function to invert black and white
LayoutGrid When set True at design-time, causes the ActiveZTERM window to draw a grid using the currently selected font. This is very useful to allow the ActiveZTERM window to be sized correctly.
LocalEcho Toggles local-echo mode.
LowBackgroundColor Reduces the intensity of background colors. Useful for cheap monitors.
NewLine  When set True, translates CR sequences received from the host to CR/LF pairs
NonRFC854 Set this property to True if connecting to Alpha Micro host systems. It alters the way ActiveZTERM receives characters to compensate for the lack of RFC-854 compliance in Alpha Micro's telnet server.
ShiftEnterAsExecute Causes Shift-Enter to send the Execute function-key sequence to the host.
SupressBell Prevents the bell character from generating a sound. Useful when automating a task on the host and have ActiveZTERM hidden.
TelnetPort Selects the port used for the telnet connection to the host.
TerminalColumns Returns the number of columns used for the display window.
TerminalRows Returns the number of rows used for the display window.
TranslateAltToFunc Should be set True to enable the Alt key to be used in place of the host Func key.
Transparent Causes any border area in the ActiveZTERM window to be drawn transparently, allowing the container to show through. (under development)
   
Methods  
Connect Establishes a connection to the host.
Copy Places the contents of the host emulation window onto the Windows clipboard.
CustomEscapeComplete  Tells ActiveZTERM that the custom escape sequence (started with ESC D from the host) is complete and that following characters will be sent to the emulator for processing.
Disconnect Closes any open connection to the host.
Paste Transfers the contents of the Windows clipboard to the host.
PrintScreen  Causes ActiveZTERM to print the current screen on the selected printer.
ReadRow Returns a string that contains all printable characters from a particular row of the emulation window.
SendFunctionKey Sends a function key sequence to the host
SendToHost Sends a string to the host system.
StartZTERM Initializes ActiveZTERM and loads the specified terminal emulator
StopZTERM Performs cleanup functions and unloads the emulator
   
Events  
ConnectionClosed Fires when the telnet session is closed by the host
CutomEscapeHandler Fires for each character received after an ESC D sequence (also see the CustomEscapeComplete method)
ExecutePrintFileRequest Fires when an execute or print file command is received from the host
ExecuteProgramRequest Fires when an execute program command is received from the host
FileTransferRequest Fires in response to a file-transfer escape sequence
FlashWindowRequest Fires when the host send a flash window command
HostCapture Returns a string as data is received from the host. Enabled by the CaptureHost property.
LabelFunctionKeyRequest  Fires when a label function key command is received
LabelSpecialKeyRequest Fires when a label special function key command is received
LabelWindowRequest Fires when the host uses the label ZTERM window escape sequence
PrinterPassthrough Fires and returns the file name containing the buffered data after a printer passthrough escape sequence has been completed
ProgramUserButtonRequest Fires when the host re-programs the user buttons via an escape sequence
ProgramUserLevelRequest Fires after the host reprograms the user button level caption
SetEmulatorPitchRequest Fires when the host attempts to change the dot-matrix emulator pitch
TerminateRequest Informs the container that the host is attempting to close the session using the terminate ZTERM escape sequence
ToggleFunctionKeyRequest Fires when the host attempts to enable or disable function key buttons
ToggleSpecialKeyRequest  Fires when the host attempts to enable or disable special key buttons
WriteStatusbarRequest Fires when the host writes text to ZTERM's status bar

Downloading ActiveZTERM

Simply follow the link to our Downloads page. The demonstration version of ActiveZTERM can be installed using a normal setup utility for users of Visual Basic and other development tools or directly into Internet Explorer 4.0 or later.