Microsoft KB Archive/71105

= How to Set Hourglass MousePointer in VB Program During Delays =

Article ID: 71105

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic for MS-DOS
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q71105



SUMMARY
During operations that take time, you may decide to display the hourglass mouse cursor. This will let the user know that the computer is performing an operation that may take some noticeable time, and that no user input will be immediately processed during this time.



MORE INFORMATION
The MousePointer property can be set during design time or during run time. During operations that may take some noticeable amount of time, the MousePointer should be set to the hourglass pointer. This can be performed using the Screen.MousePointer property. Before setting the mouse pointer to the hourglass, you should save the present mouse pointer so that when you are through with the hourglass cursor, you can re-initialize it to the previous pointer. Listed below is an example of setting the pointer to the hourglass cursor: Sub Form_Click SavedPointer = Screen.MousePointer ' Save mouse pointer. Screen.MousePointer = 11           ' 11# = hourglass. For i = 1 To 10000: Next i         ' Some lengthy operation. Screen.MousePointer = SavedPointer ' Set to previous mouse pointer. End Sub

Additional query words: VBmsdos

Keywords: KB71105

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.