Info 1 Posted February 19, 2011 (edited) Let's say my monitor resolution is 800x600 and my friend's monitor resolution is 1500x1000. How do I calculate a pixel coordinate in my screen to the coordinate of my friend's screen? Like if I choose the 400,300 pixel I should get 750,500. I have both my resolution and my friend resolution as vars and the pixel coordinates as well Edited February 19, 2011 by Info Share this post Link to post Share on other sites
UEZ 1,273 Posted February 19, 2011 (edited) A very simple math calculation: $myres_w= 800 ;@DesktopWidth $myres_h = 600 ;@DesktopHeight $friends_w = 1500 $friends_h = 1000 $my_x = 400 $my_y = 300 $friends_x = Round(($my_x / $myres_w) * $friends_w, 0) $friends_y = Round(($my_y / $myres_h) * $friends_h, 0) MsgBox(0, "Test", "Friend's coordinate: " & $friends_x & " x " & $friends_y) Br, UEZ Edited February 20, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites