etScrollBarInfo hwnd, OBJID_VSCROLL, tSBI
   If (tSBI.rgstate(0) And STATE_SYSTEM_UNAVAILABLE) = STATE_SYSTEM_UNAVAILABLE
    Then
      m_bHasVerticalScroll = False
   End If
   
   ' Get the current cursor position
   GetCursorPos m_tP
   
   m_hWnd = hwnd
   
   ' Attach subclass for WM_ACTIVATEAPP to the
   ' parent window:
   m_hWndParent = GetParentFormhWNd(m_hWnd)
   AttachMessage Me, m_hWndParent, WM_ACTIVATEAPP
   
   ' Attach mouse hook
   InstallHook Me, WH_MOUSE
   m_bInMiddleScroll = True
   
 