waitcurs.cls
来自「利用这个程序可以让你方便的管理你所收集的源程序」· CLS 代码 · 共 52 行
CLS
52 行
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 + =
减小字号Ctrl + -
显示快捷键?