Citation: VT100 ActiveX. Author: Claudiu Danilov (sherry@roearn.ici.ro)


VT100 ActiveX

Methods	Events

VT100 ActiveX emulates a VT100 Terminal in your application. The control has 24 lines and 80 columns. It implements almost all the VT100 Escape sequences, anyway, enough to run pine, vi, etc.

Syntax

VT100

Remarks

At the run-time the control automatically enables vertical and/or horizontal scroll bars depending on the size of the control and the size of the space required for showing a 24 rows, 80 columns terminal.

Author

Claudiu Danilov (sherry@roearn.ici.ro)

The Research Institute for Informatics - Bucharest


Methods

In version 2.0, VT100 ActiveX has the following methods:

CanCopy

CanPaste

CopySelectionToClipboard

MessageIn

PasteClipboard

SelectAll

SelectRegion


CanCopy method

Returns true if there is a selection that can be placed into clipboard.

Syntax

object.CanCopy

The CanCopy method syntax has these parts:

Part	Description

object	Required.  An object expression

Return Value

Boolean

Value	Description

True	Text is selected and can be put in the clipboard

False	No text is selected

Remarks

This method may be used before copying the selection into clipboard.


CanPaste method

Returns true if there is a text in clipboard that can be pasted into VT100 control.

Syntax

object.CanPaste

The CanPaste method syntax has these parts:

Part	Description

object	Required.  An object expression

Return Value

Boolean

Value	Description

True	A text exists in the clipboard, and can be pasted

False	No text is selected

Remarks

This method may be used before pasting the clipboard.


CopySelectionToClipboard method

Copies the selection into clipboard.

Syntax

object.CopySelectionToClipboard

The CopySelectionToClipboard method syntax has these parts:

Part	Description

object	Required.  An object expression

Return Value

None

Remarks

This method works only if there is a selection on the terminal window. It copies this selection as a text into the clipboard.


MessageIn method

Inserts a message into the VT100 control. Messages can contain strings of characters and escape sequences.

Syntax

object.MessageIn message, length

The MessageIn method syntax has these parts:

Part	Description

object	Required.  An object expression

message	Required.  String expression specifying the message to insert into the object.

length	Required.  Integer specifying the length of the message.

Return Value

None

Remarks

A message can consist of character strings, as well as escape sequences together. If a message contains an escape sequence, the sequence must be complete. One sequence can not begin in one message and end in the following one. For example, if you want to print the text "This is my text", jump to 3rd row, 4th column, and then print "This is another text" you can have one message: "This is my textEsc]3, 4HThis is", and another one: " another text."


PasteClipboard method

Pastes the clipboard into the terminal window.

Syntax

object.PasteClipboard

The PasteClipboard method syntax has these parts:

Part	Description

object	Required.  An object expression

Return Value

None

Remarks

This method works only if the clipboard contains a text. It pastes this text into the terminal window as a keyboard input.


SelectAll method

Selects the entire VT100 window.

Syntax

object.SelectAll

The SelectAll method syntax has these parts:

Part	Description

object	Required.  An object expression

Return Value

None

Remarks

This method works exactly like SelectRegion method, but it marks as selected the entire window of the VT100 control. It may be used before copying the selection into clipboard.


SelectRegion method

Selects a rectangle region on the VT100 window.

Syntax

object.SelectRegion top, left, bottom, right

The SelectRegion method syntax has these parts:

Part	Description

object	Required.  An object expression

top	Required.  Short integer specifying the top row of the selected region

left	Required.  Short integer specifying the left column of the selected region

bottom	Required.  Short integer specifying the bottom row of the selected region

right	Required.  Short integer specifying the right column of the selected region

Return Value

None

Remarks

Selecting a region with this method has the same effect like dragging with the mouse a rectangle on the VT100 window. It may be used before copying the selection into clipboard. For a selection that includes the entire window, you may use SelectAll method.


Events

In version 2.0 of VT100 ActiveX the following events are all standard.

Click

DblClick

MouseDown

MouseMove

MouseUp

The only custom event is:

MessageOut


MessageOut event

Occurs whenever the control wants to send out a message, usualy when the user presses a key.

Syntax

Private Sub object_MessageOut(KeyAscii As String)

The MessageOut event syntax has these parts:

Part	Description

object	An object expression.

KeyAscii	A null terminated string that contains the ASCII code for the key pressed, or an Escape sequence, if the key pressed was an arrow, or a response of the VT100 terminal for an Escape sequence.