DPROC, AddressOf WindowProc
   CreateMessageWindow = True
End Function
Private Sub DestroyMessageWindow()
   SetWindowLong m_hWnd, GWL_WNDPROC, m_lOldWndProc
   Unload frmMessageWindow
   m_hWnd = 0
End Sub

Public Sub StopTimer()
   m_iRefCount = m_iRefCount - 1
   If m_iRefCount &lt; 0 Then
      m_iRefCount = 0
   End If
   If m_iRefCount = 0 Then
      DestroyMessageWindow
      If m_lID &lt;&gt; 0 Then
         timeKillEvent m_lID
         m_lID = 0
      End If
      If m_bBegin Then
         timeEndP