DOCUMENT:Q186430 01-JUN-1998 [vbwin] TITLE :PRB: Intellipoint 'Snap To' Feature and VB5 Applications PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:2.2,5.0 OPER/SYS:WINDOWS KEYWORDS:kbVBp500 ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 on the following platforms: NT, Win95, Win98 - Microsoft IntelliPoint software version 2.2 --------------------------------------------------------------------- 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 and 98 versus Windows NT 4.0. Under Windows 95 and Windows 98, 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; this is considered the correct behavior. STATUS ====== Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. 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 --------------------------- 1. 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. 2. Create a new Standard EXE project. Form1 is created by default. 3. Add at least two CommandButtons to Form1. Add instances of several other different controls for variety. 4. Set the Default property of one of the CommandButtons to True. 5. Click Add Form on the Project menu to add a second form to your project. 6. Add the following code to the General Declarations section of Form1: Option Explicit Private Sub Form_Load() Form2.Show End Sub 7. Run the program. 8. 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. 9. 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. REFERENCES ========== For more information about implementing a 'Snap To' functionality with your Visual Basic application, please refer to the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q186428 TITLE : HOWTO: Implement the 'SnapTo' Feature in Visual Basic Additional query words: kbDSupport kbDSD kbMouse kbInterop kbVBp500 ====================================================================== Keywords : kbVBp500 Version : WINDOWS:2.2,5.0 Platform : WINDOWS Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.