Microsoft IntelliMouse Support in Visual FoxPro 5.0

Microsoft Corporation

October 1996

Introduction

Microsoft® Visual FoxPro™ 5.0 supports new mouse features provided by the Microsoft IntelliMouse™. The IntelliMouse speeds navigation through the Visual FoxPro interface in areas such as the Project Manager, the Property window, Browse windows, the Command and editing windows, and Visual FoxPro controls you place on a form.

What Is the Microsoft IntelliMouse?

The Microsoft IntelliMouse (Figure 1) is a pointing device that includes a wheel control. The wheel provides an extended set of navigation features, and it speeds navigation throughout an application's interface. For example, the wheel lets you scroll through a document without clicking the scroll bars. The wheel also acts as a third, middle mouse button.

Figure 1. The Microsoft IntelliMouse

IntelliMouse Features

The following navigation features are available with the Microsoft IntelliMouse. Note that these features are only available in applications, such as Visual FoxPro 5.0, that support the Microsoft IntelliMouse, and only a subset of these features may be supported in an application.

Easier Scrolling

Scrolling through a document was traditionally done with scroll bars; the wheel allows you to scroll through a document by rotating the wheel. To scroll down through a document, rotate the wheel backward (toward you). To scroll up through a document, rotate the wheel forward (away from you).

Continuous Scrolling

Continuous scrolling, or panning, is now available with the IntelliMouse. To pan through a document, hold down the wheel button and move the mouse in the direction in which you'd like to scroll. Depending on the application, you can pan up or down, left or right, or diagonally through a document.

An origin mark is displayed in the document at the location where the mouse button is pressed. The origin mark (Figure 2) provides a reference point from which panning occurs. The distance the mouse pointer is moved from the origin mark determines the speed at which panning occurs. The further you move the mouse pointer from the origin mark, the faster you pan through the document.

Figure 2. Origin mark for two-dimensional scrolling

Automatic Scrolling

Automatic scrolling, or AutoScroll, is activated by clicking the wheel button and moving the mouse in the direction in which you'd like the document to scroll. Scrolling continues until you press a key, click any of the three mouse buttons, or rotate the wheel. Depending on the application, you can automatically scroll up or down, left or right, or diagonally through a document.

AutoScroll is similar to panning. However, panning requires that you press the mouse button continuously.

An origin mark appears in the document at the location where the mouse button is clicked. The origin mark provides a reference point from which scrolling occurs. The distance the mouse pointer is moved from the origin mark determines the speed at which scrolling occurs. The further you move the mouse pointer from the origin mark, the faster you scroll through the document.

Zooming

Zooming allows you to change the magnification of a document. To zoom in or out, you rotate the wheel while pressing the CTRL key. Rotating the wheel forward (away from you) increases magnification; rotating the wheel backward (toward you) decreases magnification.

Zooming In on Data

Zooming in on data, or DataZoom, allows you to change the level of detail. Examples of operations where you can change the level of detail include drilling up or drilling down, navigating through outlines or hierarchies, and moving between summaries and details.

DataZoom is performed by rotating the wheel with the SHIFT key pressed. Rotating the wheel forward with SHIFT pressed provides more detail, drilling down or expanding outlines or hierarchies. Rotating the wheel backward with SHIFT pressed provides less detail, drilling up or collapsing outlines or hierarchies.

Summary

Table 1 lists the IntelliMouse features and the mouse and keyboard operations for each feature.

Table 1. IntelliMouse Features and Operations

IntelliMouse feature Mouse and keyboard operation
Scrolling Wheel rotation
Panning Wheel button click and drag
AutoScroll Wheel button click
Zooming CTRL+wheel rotation
DataZoom SHIFT+wheel rotation

Visual FoxPro Support for IntelliMouse Features

In general, any area in Visual FoxPro that uses scrollbars supports IntelliMouse features. Table 2 lists the Visual FoxPro areas in which IntelliMouse features are supported, and when the IntelliMouse features are available.

Table 2. IntelliMouse Features in Visual FoxPro

Visual FoxPro area IntelliMouse features Design time Run time
Browse Windows Scrolling, Panning, AutoScroll Yes Yes
Editing Windows Scrolling, Panning, AutoScroll Yes Yes
Print Preview Scrolling, Panning, AutoScroll, Zooming Yes Yes
Command Window Scrolling, Panning, AutoScroll Yes No
Class Designer Scrolling, Panning, AutoScroll Yes No
Database Designer Scrolling, Panning, AutoScroll Yes No
Data Environment Designer Scrolling, Panning, AutoScroll Yes No
Form Designer Scrolling, Panning, AutoScroll Yes No
Project Manager Scrolling, Panning, AutoScroll, DataZoom Yes No
Property Window Scrolling, Panning, AutoScroll Yes No

Browse Windows

Browse windows supports IntelliMouse scrolling, panning, and AutoScroll. Rotating the wheel when a Browse window is active scrolls up or down through records. If the table contains more fields than can be displayed in the Browse window, you can scroll left or right to view additional fields. To continuously scroll up or down in a Browse window, click the wheel button and move the mouse in the direction in which you'd like the records or fields to scroll. You can AutoScroll in a Browse window by clicking the wheel button and moving the mouse in the direction in which you'd like the records or fields to scroll.

Command and Editing Windows

The Command window and Editing windows support IntelliMouse scrolling, panning, and AutoScroll. Rotating the wheel when the Command window or an editing window is active scrolls up or down through text in the window. If an Editing window contains more text than can be displayed in the window and Word Wrap in the Edit Properties dialog box is turned off, you can scroll left or right to view additional text. You can continuously scroll up or down in the Command window or an Editing window by clicking the wheel button and moving the mouse in the direction in which you'd like to scroll. To AutoScroll in the Command window or an Editing window, click the wheel button and move the mouse in the direction in which you'd like the text to scroll.

Print Preview

The Print Preview window supports IntelliMouse scrolling, panning, AutoScroll, and zooming. Zooming allows you to zoom in or zoom out of the printed page representation. To zoom in (increase magnification) on the printed page representation, press CTRL and rotate the wheel forward (away from you). To zoom out (decrease magnification) on the printed page representation, press CTRL and rotate the wheel backward (toward you).

Class and Form Designers

The Class and Form Designers support IntelliMouse scrolling, panning, and AutoScroll. Rotating the wheel when the Class or Form Designer is active scrolls the class or form up or down. To continuously scroll up or down in the Class or Form Designer, click the wheel button and move the mouse in the direction in which you'd like the class or form to scroll. You can AutoScroll in the Class or Form Designer by clicking the wheel button and moving the mouse in the direction in which you'd like the class or form to scroll.

Database and Data Environment Designer

The Database and Data Environment Designer support IntelliMouse scrolling, panning, and AutoScroll. Rotating the wheel when the Database or Data Environment Designer is active scrolls the tables and views in the designer up or down. To continuously scroll up or down in the Database or Data Environment Designer, click the wheel button and move the mouse in the direction in which you'd like the tables and views to scroll. You can AutoScroll in the Database or Data Environment Designer by clicking the wheel button and moving the mouse in the direction in which you'd like the tables and views to scroll.

Project Manager

The Project Manager supports IntelliMouse scrolling, panning, AutoScroll, and DataZoom. To use DataZoom in the Project Manager, select an item that has subordinate items (a + appears to the left of the item), press SHIFT, and then rotate the wheel forward to drill down and display the subordinate items. For example, pressing SHIFT and rotating the wheel forward when the Code item is selected displays the subordinate Programs, API Libraries, and Application items (Figure 3). Pressing SHIFT and rotating the wheel backward drills upwards, hiding the subordinate items.

Figure 3. Drilling down into the Code item in Project Manager

Property Window

The Property window supports IntelliMouse scrolling, panning, and AutoScroll. Rotating the wheel when the Property window is active scrolls the properties up or down within the Property window. You can continuously scroll up or down in the Property window by clicking the wheel button and moving the mouse in the direction in which you'd like the properties to scroll. You can AutoScroll in the Property window by clicking the wheel button and moving the mouse in the direction in which you'd like the properties to scroll.

Additional Visual FoxPro Support of IntelliMouse Features

Visual FoxPro allows you to determine whether the wheel is rotated or pressed through the MouseWheel and MiddleClick events. You can also determine whether the wheel or a mouse button is pressed or released through the MouseDown and MouseUp events. A subset of Visual FoxPro controls, such as the Grid control, also supports IntelliMouse features. ActiveX™ controls, which can be added to Visual FoxPro forms, can also support IntelliMouse features. These additional features are described below.

MouseWheel Event

The Visual FoxPro MouseWheel event occurs when the IntelliMouse wheel is rotated. Five parameters are passed to the MouseWheel event procedure. The parameters let you determine the control for which the MouseWheel event occurred (if the control is in a control array), the distance the wheel is rotated, the state of the SHIFT, CTRL, and ALT keys when the MouseWheel event occurred, and the coordinates of the mouse pointer. For more information about these parameters, see the MouseWheel event topic in Visual FoxPro Help.

MiddleClick Event

The MiddleClick event occurs when the wheel is pressed, and it corresponds to a middle mouse button click for a three-button mouse. A single parameter is passed to the MiddleClick event procedure, allowing you to determine the control for which the MiddleClick event occurred (if the control is in a control array). For more information about this parameter, see the MiddleClick event topic in Visual FoxPro Help.

MouseDown Event

The MouseDown event occurs when either the wheel or the left or right mouse button is pressed. Four parameters are passed to the MouseDown event procedure. The parameters let you determine whether the wheel or the left or right mouse button was pressed, the state of the SHIFT, CTRL, and ALT keys when the MouseDown event occurred, and the coordinates of the mouse pointer. For more information about these parameters, see the MouseDown event topic in Visual FoxPro Help.

MouseUp Event

The MouseUp event occurs when either the wheel or the left or right mouse button is released. Four parameters are passed to the MouseUp event procedure. The parameters let you determine if the wheel or the left or right mouse button was released, the state of the SHIFT, CTRL, and ALT keys when the MouseUp event occurred, and the coordinates of the mouse pointer. For more information about these parameters, see the MouseUp event topic in Visual FoxPro Help.

Visual FoxPro Controls

Table 3 lists the Visual FoxPro controls that support IntelliMouse features. For more information about an IntelliMouse feature, see the IntelliMouse Features section above.

Table 3. Visual FoxPro Controls that Support IntelliMouse Features

Control IntelliMouse features supported
CheckBox Scrolling (rotating the wheel inverts the check box value)
EditBox Scrolling, Panning, AutoScroll
Grid Scrolling, Panning, AutoScroll
ListBox Scrolling, Panning, AutoScroll
Spinner Scrolling (rotating the wheel increments or decrements the spinner value)

ActiveX Controls

Support for IntelliMouse features in ActiveX controls is determined by the ActiveX control, not Visual FoxPro. If an ActiveX control supports IntelliMouse features, the features will be available when the control is placed on a form in Visual FoxPro.