感觉使用效果比时间控件爽些哈!!! Private Declare Function timeGetTime Lib "winmm.dll" () As Long Function Delay(Dtime As Integer) As Long Savetime = timeGetTime While timeGetTime < Savetime + Dtime DoEvents Wend End Function
VBA实现进度条的显示 Sub Test() ' The UserForm1_Activate sub calls Main UserForm1.LabelProgress.Width = 0 UserForm1.Show End Sub Private Sub UserForm_activate() Call Main End Sub Sub Main() ' Inserts random numbers on the active worksheet Dim Counter As Inte
避免显示区域的闪动现象。 Call ValidateRect(cLvwMer.hwnd, rc) DoEvents p = p + 1 If p Mod 1000 = 0 Then Call InvalidateRect(cLvwMer.hwnd, rc, True) cLvwMer.Refresh Call ValidateRect(cLvwMer.hwnd, rc) End If