Overview of Performance Monitoring

Previous Topic Next Topic

Placing the Control in an Office Document or on a Web Page

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

  1. Start the application and select Toolbars under the View menu.
  2. Under Toolbars, select Control Toolbox.
  3. With the Control Toolbox displayed, click the More Controls icon and select the System Monitor Control.
Figure 5.17    System Monitor Control in the Control Toolbox
Enlarge figure

Figure 5.17 System Monitor Control in the Control Toolbox

Figure 5.17 shows the System Monitor control selected in the Control Toolbox.

  1. Place the control on the page according to the requirements of the application. See the following differences among applications:

    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-icon

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

  1. On the File menu, choose New to open a new project (such as a Standard EXE or an ActiveX Document EXE).
  2. On the Project menu, click Components to show the Components dialog box.

    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.

  3. Under Controls in the Components dialog box, select the System Monitor Control Library check box, and then click OK.

    An icon for the System Monitor control now appears in the Toolbox.

  4. With the form or the document displayed, double-click the System Monitor Control icon to add it to the form or document for your program.

    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

  1. In a new or existing FrontPage Web page, on the Insert menu, select Other Components, and then select ActiveX Control.
  2. In the ActiveX Control Properties dialog box, select Sysmon Graph Control in the Pick A Control list box.
  3. To add VBScript, click Extended, and complete the Extended Attributes dialog box as needed.

    For more information about VBScript, see the VBScript link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources.

© 1985-2000 Microsoft Corporation. All rights reserved.