Autor Tema: Constraining mouse pointer to primary display with Dualview  (Leído 4088 veces)

0 Usuarios y 2 Visitantes están viendo este tema.

Gianni

  • Bytes
  • *
  • Mensajes: 28
  • Reputación: +0/-0
    • Ver Perfil
Constraining mouse pointer to primary display with Dualview
« en: Octubre 11, 2013, 04:23:48 am »
Hello

I have a problem.I need to Constraining mouse pointer to primary display in a system with Dualview monitor.
With ClipCursor it works until I click a window (changing focus), then it stops constraining the mouse.
How I can fix it?

Tengo un problema . Yo tendría que limitar el puntero del ratón en la pantalla principal en un sistema con Dualview monitor.
Con ClipCursor funciona, pero tan pronto como se hace clic en una ventana ( el cambio de enfoque) , el puntero del ratón ya no se limita al monitor principal.
¿Cómo puedo solucionarlo?

Gracias por la ayuda

cobein

  • Moderador Global
  • Gigabyte
  • *****
  • Mensajes: 348
  • Reputación: +63/-0
  • Más Argentino que el morcipan
    • Ver Perfil
Re:Constraining mouse pointer to primary display with Dualview
« Respuesta #1 en: Octubre 11, 2013, 09:31:07 am »
Just a simple example using global mouse hook, Im not sure if it works with dual monitors I can't test it here.

https://dl.dropboxusercontent.com/u/43394978/ClipCursor.rar

Waldo

  • Gigabyte
  • ****
  • Mensajes: 264
  • Reputación: +22/-0
    • Ver Perfil
Re:Constraining mouse pointer to primary display with Dualview
« Respuesta #2 en: Octubre 11, 2013, 09:31:42 am »
supongo que la funcion clipcursor funciona mientras tu aplicacion tenga el foco, cuando haces click en otra ventana de otra aplicacion, ya tu aplicacion no tiene el foco y windows permite el normal funcionamiento del puntero

Gianni

  • Bytes
  • *
  • Mensajes: 28
  • Reputación: +0/-0
    • Ver Perfil
Re:Constraining mouse pointer to primary display with Dualview
« Respuesta #3 en: Octubre 11, 2013, 10:22:02 am »
Hello and thanks for reply

cobein:
sorry, your link is invalid

Waldo:
You are correct .
The problem is how to check loss of focus of my application to be able to recall again ClipCursor.

Estás en lo correcto .
El problema es cómo controlar la pérdida de foco de mi aplicación, para que pueda volver a ejecutar ClipCursor .


cobein

  • Moderador Global
  • Gigabyte
  • *****
  • Mensajes: 348
  • Reputación: +63/-0
  • Más Argentino que el morcipan
    • Ver Perfil
Re:Constraining mouse pointer to primary display with Dualview
« Respuesta #4 en: Octubre 11, 2013, 10:27:29 am »
Link is working now.

Gianni

  • Bytes
  • *
  • Mensajes: 28
  • Reputación: +0/-0
    • Ver Perfil
Re:Constraining mouse pointer to primary display with Dualview
« Respuesta #5 en: Octubre 11, 2013, 12:09:21 pm »
Hello
thanks for link cobein.

The code seems to work.
Now I have another problem ... but I will explain this in another thread