{"id":83,"date":"2011-05-22T07:49:05","date_gmt":"2011-05-22T07:49:05","guid":{"rendered":"http:\/\/devnot.wordpress.com\/?p=83"},"modified":"2011-05-22T07:49:05","modified_gmt":"2011-05-22T07:49:05","slug":"get-the-mouse-coordinates-screen-and-client","status":"publish","type":"post","link":"https:\/\/thomas-jansen.eu\/?p=83","title":{"rendered":"Get the current mouse location (Screen and Client)"},"content":{"rendered":"<p>To get the current mouse position use the static method <em>Control.MousePosition<\/em><\/p>\n<p>It returns a <em>Point<\/em> structure in screen coordinates. Use <em>PointToClient<\/em> method of the control to map it to client coordinates.<\/p>\n<p>Example:<\/p>\n<pre>Point cp = panel1.PointToClient(Control.MousePosition);<\/pre>\n<p><strong>Note:<\/strong><br \/>\nThe <em>PointToClient<\/em> result may be outside the control&#8217;s bounding area if the mouse was not above the control.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get the current mouse position use the static method Control.MousePosition It returns a Point structure in screen coordinates. Use PointToClient method of the control to map it to client coordinates. Example: Point cp = panel1.PointToClient(Control.MousePosition); Note: The PointToClient result may be outside the control&#8217;s bounding area if the mouse was not above the control.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[46],"class_list":["post-83","post","type-post","status-publish","format-standard","hentry","category-c","tag-mouse-location"],"_links":{"self":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/83","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":0,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"wp:attachment":[{"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas-jansen.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}