• Post Reply Bookmark Topic Watch Topic
  • New Topic

Moving the mouse pointer on a different screen size  RSS feed

 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys! My remote control app is working properly, thanks to you guys help! But now I'm experiencing a problem when I scale the remote screen and send the mouse position to a different screen size. So I used following code :


This is only a code snnipet, any advices?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinicius Souza wrote:But now I'm experiencing a problem when I scale the remote screen and send the mouse position to a different screen size.


You need to tell us what that problem is.
 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:
Vinicius Souza wrote:But now I'm experiencing a problem when I scale the remote screen and send the mouse position to a different screen size.


You need to tell us what that problem is.

Sorry friends!
The problem is that when moving the mouse on the remote (scaled) screen the corresponding move on the real screen is not moving according, so I used that code above to calculate the new position but its not working properly....
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am afraid that doesn't add much to what we know.
 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the image bellow:


See what is happening?
 
Carey Brown
Saloon Keeper
Posts: 3328
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In line 5
tamanhoTela.width / w
what are the data types?
 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved! To fix the problem I calculate the percent of the screen wich xMouse and yMouse is placed doing that I can resize the screen and send that percentual over the socket then apply it on the other side.
Thanks to all!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!