this doesn't work in windows 2000
anyone know why?Code:Option Explicit Private Declare Function GetCursor Lib "user32.dll" () As Long Private Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As String) As Long Private Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Long) As Long Public lArrow As Long ' get the handle of the arrow cursor Public lCursor As Long ' send the handle of the hourglass cursor Public retval As Long ' return value Const IDC_WAIT = vbHourglass Const IDC_ARROW = vbDefault Private Sub Command1_Click() ' save the handle to the arrow cursor lArrow = GetCursor() ' send the handle of the hourglass cursor lCursor = LoadCursor(0, IDC_WAIT) ' set the cursor to hourglass SetCursor (lCursor) End Sub Private Sub Command2_Click() ' change hourglass back to the arrow SetCursor (lArrow) End Sub




Reply With Quote