Microsoft KB Archive/186430

= FIX: Intellipoint 'Snap To' Feature and VB5 Applications =

Article ID: 186430

Article Last Modified on 9/27/2004

-

APPLIES TO

 Microsoft Visual Basic 5.0 Learning Edition, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 95

 Microsoft Windows 98 Standard Edition

 Microsoft Windows Millennium Edition</li></ul> </li> Microsoft Visual Basic 5.0 Professional Edition, when used with:  Microsoft Windows NT 4.0</li></ul>

 Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul>

 Microsoft Windows Millennium Edition</li></ul> </li> Microsoft Visual Basic 5.0 Enterprise Edition, when used with:  Microsoft Windows NT 4.0</li></ul>

 Microsoft Windows 95</li></ul>

 Microsoft Windows 98 Standard Edition</li></ul>

<ul> <li>Microsoft Windows Millennium Edition</li></ul> </li> <li>Microsoft IntelliPoint 2.2</li></ul>

-

<div class="notice_section">

This article was previously published under Q186430

<div class="symptoms_section">

SYMPTOMS
When the 'Snap To' option of Intellipoint 2.2 is in effect, you may observe a difference in behavior with Visual Basic 5.0 applications running under Windows 95, Windows 98, and Windows Me versus Windows NT 4.0 or Windows 2000.

Under Windows 95, Windows 98, and Windows Me, the mouse pointer moves to the Command button with focus when its parent form gains focus. There is no cursor movement under Windows NT 4.0 or Windows 2000; this is considered the correct behavior.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Basic 6.0.

<div class="moreinformation_section">

MORE INFORMATION
The function of the Intellipoint 'Snap To' option is to place the mouse cursor over the default Command Button on a window, if any, when that window acquires focus. Visual Basic 5.0 is not designed to support this Intellipoint functionality.

Steps to Reproduce Behavior
<ol> <li>Make certain you have Intellipoint 2.2 installed on your Win95 or Win98 computer. Open the Windows Control Panel and double-click the Mouse icon. When the dialog box appears, you should see four check boxes. Make certain that the upper-left checkbox is selected, and then exit the dialog box.</li> <li>Create a new Standard EXE project. Form1 is created by default.</li> <li>Add at least two CommandButtons to Form1. Add instances of several other different controls for variety.</li> <li>Set the Default property of one of the CommandButtons to True.</li> <li>Click Add Form on the Project menu to add a second form to your project.</li> <li> Add the following code to the General Declarations section of Form1: Option Explicit

Private Sub Form_Load Form2.Show End Sub </li> <li>Run the program.</li> <li>Note which control has the focus. Click a command button if one does not have focus. Click on Form2 and then press the ALT-TAB key combination to give Form1 the focus. The cursor will be positioned over the command button which has the focus.</li> <li>Click a control other than one of the command buttons. Press the ALT-TAB key combination to shift focus from Form1 to Form 2. Press the ALT-TAB key combination again to shift focus back to Form1. The mouse cursor has been moved to the center of the default command button.</li></ol>

<div class="references_section">