Overview of Performance Monitoring |
Integration of the Microsoft Office applications with Visual Basic for Applications makes the process of adding the System Monitor control almost identical across these applications. The following procedures describe how to insert the control in applications such as Microsoft Word, Microsoft Excel, and Microsoft PowerPoint®. For purposes of this section, the word "document" is used to refer to PowerPoint slides, Word documents, or Excel spreadsheets.
In addition, you can add the control to a Web page using an HTML editor that supports insertion of ActiveX controls or using a text editor as described in "To insert the control in an HTML Page."
To insert the System Monitor control into a Microsoft Office application
Figure 5.17 System Monitor Control in the Control Toolbox
Figure 5.17 shows the System Monitor control selected in the Control Toolbox.
If you do not create a placeholder, you can click any location on the spreadsheet and the control will be inserted in the location with a default size. Design mode is active and you need to exit Design mode before setting control properties or adding counters. Click the Design Mode icon to exit.
The Design mode icon is not displayed after you insert the control although Design mode is in effect. To exit Design mode, on the View menu, click Slide Show.
Note
The System Monitor control is not displayed correctly until you exit Design mode.
With the control sited in the document, you can add counters or modify control properties, as described in the System Monitor Help file (Sysmon.chm).
If you select Graph for the Display Type and the size you define for the control is insufficient to show the graph data, only a portion of the graph will be displayed (such as the vertical minimum and maximum scale values, and the counter-data graph lines).
If you select Report for the Display Type and the size is insufficient to show all the report data, the control includes vertical and horizontal scroll bars so that you can scroll to view the data that does not fit in the display.
If you want to format the control in the application, resume Design mode by clicking the Design mode icon in the Control Toolbox and see the procedure named "To format the control in a document" later in this chapter.
To insert the control in a Microsoft Visual Basic program
You can also view the Components dialog box by right-clicking the Toolbox. If the Toolbox is not displayed, in the View menu, select the Toolbox command.
An icon for the System Monitor control now appears in the Toolbox.
This places the control in the document, occupying the entire size of the form. If you want to select a size for the control, click the System Monitor Control icon once and then, when the crosshair appears, hold down and drag the mouse to the size you want the control to occupy on the form.
Immediately after inserting the control, the application is in Design mode, so you can format the control within a document. For more information, see the procedure "To format the control in a document" later in this chapter.
To insert the control in an HTML page
<OBJECT classid="clsid:C4D2D8E0-D1DD-11CE-940F-008029004347">
</OBJECT>
This places the control in the document and, when you view the page in a Web browser, you can add counters or modify control properties as described in the procedures that appear later in this document.
To include functions in your page that automate the setting of properties or addition of counters, use scripts written in Visual Basic Scripting Edition (VBScript), or use Microsoft FrontPage®, as described in the following procedure.
To insert the System Monitor control into a Web page created with Microsoft FrontPage
For more information about VBScript, see the VBScript link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources.