home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / himetr1r / cwaitcur.cls < prev    next >
Encoding:
Visual Basic class definition  |  1999-08-14  |  1.0 KB  |  43 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "CWaitCursor"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = True
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = False
  10. '----------------------------------------
  11. '- Name: Sam Huggill
  12. '- Email: sam@vbsquare.com
  13. '- Web: http://www.vbsquare.com/
  14. '- Company: Lighthouse Internet Solutions
  15. '- Date/Time: 14/08/99 11:25:57
  16. '----------------------------------------
  17. '- Notes:   The class automatically resets the
  18. '           mouse pointer when a procedure
  19. '           exits
  20. '----------------------------------------
  21.  
  22. Option Explicit
  23.  
  24. Private mlPointer As MousePointerConstants
  25.  
  26. Private Sub Class_Initialize()
  27.     mlPointer = Screen.MousePointer
  28. End Sub
  29.  
  30. Private Sub Class_Terminate()
  31.     Restore
  32. End Sub
  33.  
  34. Public Sub SetCursor(Optional nPointer As MousePointerConstants = vbHourglass)
  35.     Screen.MousePointer = nPointer
  36. End Sub
  37.  
  38. Public Sub Restore()
  39.     Screen.MousePointer = mlPointer
  40. End Sub
  41.  
  42.  
  43.