⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 waitcurs.cls

📁 vb控件代码大全
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "WaitCursor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'
' Wait Cursor Class
'
' Chris Eastwood January 1999
'
' This class encapsulates the setting of the cursor to ensure that it is
' always returned to the correct pointer, even if errors occur in the calling
' routine.
'
' Usage :
'
' Sub MySub(..)
'
'   Dim cWait As WaitCursor
'
'   Set cWait = New cWait
'
'   cWait.SetCursor
'
'   <do whatever processing>
'
' When cWait goes out of scope, the cursor is automatically returned to the
' default (or what the cursor was before cWait.SetCursor was called)

Private mlPointer As MousePointerConstants

Public Sub SetCursor(Optional nPointer As MousePointerConstants = vbHourglass)
    Screen.MousePointer = nPointer
End Sub

Public Sub Restore()
    Screen.MousePointer = mlPointer
End Sub

Private Sub Class_Initialize()
   mlPointer = Screen.MousePointer
End Sub

Private Sub Class_Terminate()
    Restore
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -