Click or drag to resize

Console Class

X#
Encapsulate a Win32 console application.
Inheritance Hierarchy
Object
  Console

Namespace:  VO
Assembly:  VOConsoleClasses (in VOConsoleClasses.dll) Version: 2.19
Syntax
 CLASS Console
Request Example View Source

The Console type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleConsole
Instantiate a new Console object.
Public methodCode exampleConsole(Logic)
Instantiate a new Console object.
Top
Properties
  NameDescription
Public propertyCursorPos
The current cursor position as a ConsoleCoord object.
Public propertyCursorSize
An integer specifying the current cursor size.
Public propertyCursorVisible
A logic controlling the cursor's visibility.
Public propertySize
The size of the console as a ConsoleCoord object.
Public propertyTextAttribute
A word specifying the current text attributes.
Public propertyTitle
A string specifying the console application's caption.
Top
Methods
  NameDescription
Public methodCode exampleClear
Clear the console window.
Public methodDestroy
Provide a method to de-instantiate a.
Public methodCode exampleRead
Use this to read the console input buffer.
Public methodCode exampleWait
Waits for a key press or mouse click on the console window.
Public methodCode exampleWrite
Write a string to the console window.
Public methodWriteError
Write an error message string to the StdErr handle.
Public methodWriteLine
Write a string to the console window and start a new line.
Top
Remarks
A noticeable difference between the implementation of the two libraries can be seen when starting an application from the command line. A Terminal Lite application will get a new window allocated, while a Console Classes application runs in the same window in which it was started. Depending on the command line setting, a Console Classes application can also run full screen, while a Terminal Lite application cannot. Also, using the Console Classes does not require an additional runtime DLL to be distributed with your application.
Tip Tip
The application type has to be set to Console in the Application Options dialog box in order to run the application within the Win32 console. Otherwise, a separate console window is created. You can also use the Console class to create a separate console window in a regular Windows application, e.g., to output some debug information.
See Also

Reference