How to Make Mouse Pointer (Cursor) Maintain Hourglass ShapeID: Q110542
|
You can have a Visual Basic application program set the mouse pointer (cursor) to an hour glass shape and wait. However, if the user moves the mouse over another application's window, the cursor will return to a mouse pointer. To force the cursor to maintain the hourglass shape even while over other windows, make the window a system modal window by using the SetSysModalWindow Windows API function.
Declare Function SetSysModalWindow% Lib "User" (ByVal hwnd%)
Const HourGlass = 11
Sub Form1_Load ()
Me.Show
Screen.MousePointer = HourGlass
' Remove the following line to see how the mouse behaves without it
result% = SetSysModalWindow%(form1.hWnd)
End Sub
Sub Form1_Click ()
Unload Form1
End Sub
Additional query words: 2.00 3.00
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: June 25, 1999