CONTROLAR EL CURSOR Y EVENTOS DEL RATÓN


'RATÓN ->
    DllImport ( "User32.dll" )> _
    Public Shared Function SetCursorPos ( ByVal X Como Entero , ByVal Y Como Entero ) Como Largo
    Fin Función
    DllImport ( "User32.dll" )> _
    Public Shared Function GetCursorPos ( ByRef lpPoint Como Point ) Como Largo
    Fin Función
    DllImport ( "User32.dll" )> _
    Public Shared Sub mouse_event( ByVal dwFlags As Integer , ByVal dx As Integer , ByVal dy As Integer , ByVal cButtons As Integer , ByVal dwExtraInfo As IntPtr )
    End Sub

    Dim URLini Como Cadena

    Public Const MOUSEEVENTF_LEFTDOWN = & H2 'botón izquierdo
    Public Const MOUSEEVENTF_LEFTUP = & H4 'botón izquierdo hasta
    Public Const MOUSEEVENTF_MIDDLEDOWN = & H20 'botón del medio hacia abajo
    Public Const MOUSEEVENTF_MIDDLEUP = & H40 'botón central hasta
    Public Const MOUSEEVENTF_RIGHTDOWN = & H8 'botón de la derecha abajo
    Public Const MOUSEEVENTF_RIGHTUP = & H10 'botón hasta

    '<- font="" rat="">

Private Sub ...
'Cursor 1 Posicionamos el
SetCursorPos (Me.Width - 210, 165)
'2 Pulsamos boton Derecho del Ratón
mouse_event (MOUSEEVENTF_LEFTDOWN, Me.Width - 215, 165, 0, 0)
mouse_event (MOUSEEVENTF_LEFTUP, Me.Width - 215, 165, 0, 0)
End Sub

DESACTIVAR TECLAS Y RATÓN AL USUARIO

 Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long


 Private Sub  .....
        BlockInput(True) 'bloqueamos las interacciones del usuario 
         '<--- llamadas a las rutinas que deseamos ejecutar con las interacciones del usuario bloqueadas--->
        BlockInput(False)' desbloqueamos las interacciones del usuario
  End Sub