The SYSTEMMONITOR object is an intrinsic object that allows programmatic access to the Presentation Server System Monitor tool. It is automatically created at startup and is always available.
The System Monitor tool and the available commands are fully described in the "System Monitor" chapter of this manual.
Developer Notes
- The SYSTEMMONITOR object cannot be destroyed by the SYSTEM DESTROY method.
SYSTEMMONITOR Properties
The SYSTEMMONITOR object supports the following properties
Name | Description |
---|---|
CMDLIST | Returns a list of previously executed commands |
HANDLE | Returns the window handle of the System Monitor form. |
RESULTS | Returns the contents of the System Monitor results edit box control. |
SIZE | Gets or sets the position and size of the System Monitor form. |
TEXT | Gets or sets the contents of the System Monitor command edit line control. |
VISIBLE | Specifies if the System Monitor is visible or not. |
CMDLIST property
Description
Returns an @Fm delimited array of previously executed System Monitor commands.
Property Value
An @Fm-delimited list of command strings.
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
Remarks
N/a.
Example
// Example - get a list of commands that have been executed in the // // System Monitor// CmdList = Get_Property( "SYSTEMMONITOR", "CMDLIST" )
See Also
SYSTEMMONITOR RUN method.
HANDLE property
Description
Returns the window handle (HWND) of the System Monitor form.
Property Value
This property is an unsigned integer.
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
Remarks
N/a.
Example
// Example - get the System Monitor handle// hwndSysMon = Get_Property( "SYSTEMMONITOR", "HANDLE" )
See Also
Common GUI Object HANDLE property.
RESULTS property
Description
Returns the contents of the System Monitor results edit box control.
Property Value
A string containing the contents of the results edit box. Multiple lines are delimited by standard Windows carriage-return/line-feed characters.
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
Remarks
N/a.
Example
// Example - get the System Monitor results and convert into an @Tm delimited// // array// $Insert RTI_Text_Equates SMResults = Get_Property( "SYSTEMMONITOR", "RESULTS" ) Swap CRLF$ With @Tm In SMResults
See Also
EDITBOX TEXT property, SYSTEMMONITOR RUN method.
SIZE property
Description
Specifies the position and size of the System Monitor form.
Property Value
For both getting and setting the SIZE property the value is an @Fm-delimited array of integer coordinates:
<1> Left
<2> Top
<3> Width
<4> Height
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
Remarks
N/a.
Example
// Example - move the System Monitor but keep it the current size// SMSize = Get_Property( "SYSTEMMONITOR", "SIZE" ) SMSize<1> = 20 SMSize<2> = 10 Call Set_Property( "SYSTEMMONITOR", "SIZE", SMSize )
See Also
Common GUI Object SIZE property.
TEXT property
Description
Specifies the contents of the System Monitor command edit line control.
Property Value
This property is a string value.
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
Remarks
Setting the text will not execute a command – use the RUN method instead.
Example
// Example - set the current System Monitor command// Call Set_Property_Only( "SYSTEMMONITOR", "TEXT", "GC" )
See Also
Common GUI Object TEXT property, SYSTEMMONITOR RUN method.
VISIBLE property
Description
Specifies if the System Monitor is visible or not.
Property Value
The VISIBLE property is an integer value that specifies how the System Monitor is displayed.
Value | Name | Description |
---|---|---|
0 | SW_HIDE | Hides the System Monitor and activates another form. |
1 | SW_SHOWNORMAL | Activates and shows the System Monitor and restores it if needed. |
2 | SW_SHOWMINIMIZED | Minimizes the System Monitor. |
3 | SW_SHOWMAXIMIZED | Maximizes the System Monitor. |
4 | SW_SHOWNOACTIVATE | Displays the System Monitor in its most recent size and position. But doesn't activate it. |
5 | SW_SHOW | Activates the System Monitor and displays it in its current size and position. |
6 | SW_MINIMIZE | Minimizes the System Monitor and activates the next top-level window in the Z order. |
7 | SW_SHOWMINNOACTIVE | Displays the System Monitor as a minimized window but doesn't activate it. |
8 | SW_SHOWNA | Activates the System Monitor and displays it in its current size and position but doesn't activate it. |
9 | SW_RESTORE | Same as SW_SHOWNORMAL. |
Property Traits
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
Remarks
The VISIBLE property is implemented internally using the ShowWindow Windows API function and the property value actually corresponds to the function's nCmdShow parameter values.
Constants for these values are defined in the MSWIN_SHOWWINDOW_EQUATES insert record.
Example
$Insert MsWin_ShowWindow_Equates // Example – Hiding the System Monitor// Call Set_Property_Only( "SYSTEMMONITOR", "VISIBLE", SW_HIDE$ )
See also
WINDOW VISIBLE property.
SYSTEMMONITOR Methods
The SYSTEMMONITOR object supports the following methods:
Name | Description |
---|---|
OUTPUT | Outputs text to the System Monitor results edit box control. |
RUN | Executes a System Monitor command. |
OUTPUT Method
Description
Appends text to the contents of System Monitor results edit box control.
Syntax
Call Exec_Method( "SYSTEMMONITOR", "OUTPUT", Info )
Parameters
Name | Required | Description |
---|---|---|
Info | Yes | Text to append – multiple lines should be carriage-return/line-feed delimited. |
Returns
N/a.
Remarks
N/a.
Example
// Example : Calculate the average speed of a process and output the// // results to the System Monitor ...// t1 = 0 t2 = 0 Call DosTime( t1 ) For X = 1 to 10000 Call MyProc() Next Call DosTime( t2 ) t = ( ( t2 - t1 ) / 10000 ) Call Exec_Method( "SYSTEMMONITOR", "OUTPUT", t )
See also
SYSTEMMONITOR RESULTS property, SYSTEMMONITOR RUN method.
RUN method
Description
Executes a System Monitor command.
Syntax
Call Exec_Method( "SYSTEMMONITOR", "RUN", Command )
Parameters
Name | Required | Description |
---|---|---|
Command | Yes | String containing the command to execute. |
Returns
N/a.
Remarks
The available commands are described in the System Monitor chapter of this manual.
Example
// Example - Execute a stored procedure in the System Monitor passing// // it two arguments// Cmd = "CP_TEST_FIB_SEQ 5000, 1" Call Exec_Method( "SYSTEMMONITOR", "RUN", Cmd )
See also
SYSTEMMONITOR TEXT property, The System Monitor chapter.