vbdpss.hlp (Table of Contents; Topic list)
Article Q71105
                                                 Contents  Index  Back
─────────────────────────────────────────────────────────────────────────────
                           Knowledge Base Contents  Knowledge Base Index
 
 How to Set Hourglass MousePointer in VBDOS Program During Delays - Q71105
 
 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