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.
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. |
Returns an @Fm delimited array of previously executed System Monitor commands.
An @Fm-delimited list of command strings.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
N/a.
// Example - get a list of commands that have been executed in the // // System Monitor// CmdList = Get_Property( "SYSTEMMONITOR", "CMDLIST" )
SYSTEMMONITOR RUN method.
Returns the window handle (HWND) of the System Monitor form.
This property is an unsigned integer.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
N/a.
// Example - get the System Monitor handle// hwndSysMon = Get_Property( "SYSTEMMONITOR", "HANDLE" )
Common GUI Object HANDLE property.
Returns the contents of the System Monitor results edit box control.
A string containing the contents of the results edit box. Multiple lines are delimited by standard Windows carriage-return/line-feed characters.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get | No | No | No |
N/a.
// 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
EDITBOX TEXT property, SYSTEMMONITOR RUN method.
Specifies the position and size of the System Monitor form.
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
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
N/a.
// 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 )
Common GUI Object SIZE property.
Specifies the contents of the System Monitor command edit line control.
This property is a string value.
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
Setting the text will not execute a command – use the RUN method instead.
// Example - set the current System Monitor command// Call Set_Property_Only( "SYSTEMMONITOR", "TEXT", "GC" )
Common GUI Object TEXT property, SYSTEMMONITOR RUN method.
Specifies if the System Monitor is visible or not.
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. |
Development | Runtime | Indexed | Scaled | Synthetic |
---|---|---|---|---|
N/a | Get/Set | No | No | No |
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.
$Insert MsWin_ShowWindow_Equates // Example – Hiding the System Monitor// Call Set_Property_Only( "SYSTEMMONITOR", "VISIBLE", SW_HIDE$ )
WINDOW VISIBLE property.
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. |
Appends text to the contents of System Monitor results edit box control.
Call Exec_Method( "SYSTEMMONITOR", "OUTPUT", Info )
Name | Required | Description |
---|---|---|
Info | Yes | Text to append – multiple lines should be carriage-return/line-feed delimited. |
N/a.
N/a.
// 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 )
SYSTEMMONITOR RESULTS property, SYSTEMMONITOR RUN method.
Executes a System Monitor command.
Call Exec_Method( "SYSTEMMONITOR", "RUN", Command )
Name | Required | Description |
---|---|---|
Command | Yes | String containing the command to execute. |
N/a.
The available commands are described in the System Monitor chapter of this manual.
// 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 )
SYSTEMMONITOR TEXT property, The System Monitor chapter.