'doevents
'   挂起的控件或窗体的消息的过程。如果你正在执行一紧/下一步的或做循环和需要允许您控制/表单响应用户输入，请调用此函数。
Sub FF_DoEvents()

   Dim uMsg As Msg
   
   Do While PeekMessage(Varptr(uMsg), 0, 0, 0, PM_REMOVE) 
      If IsDialogMessage(GetActiveWindow, Varptr(uMsg)) = 0 Then
         TranslateMessage Varptr(uMsg)
         DispatchMessage Varptr(uMsg)
      End If   
   Loop

End Sub

