{"id":105,"date":"2015-11-16T21:42:00","date_gmt":"2015-11-16T12:42:00","guid":{"rendered":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/2015\/11\/16\/c-to-save-the-position-when-sticky-note-is-moved\/"},"modified":"2015-12-29T18:54:59","modified_gmt":"2015-12-29T09:54:59","slug":"c-to-save-the-position-when-sticky-note-is-moved","status":"publish","type":"post","link":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/2015\/11\/16\/c-to-save-the-position-when-sticky-note-is-moved\/","title":{"rendered":"C#: To save the position when sticky note is moved."},"content":{"rendered":"<p>This is blog that was translated from Japanese to English.<br \/><a href=\"http:\/\/non-it-salaryman.blogspot.jp\/2015\/11\/c_12.html\" target=\"_blank\">http:\/\/non-it-salaryman.blogspot.jp\/2015\/11\/c_12.html<\/a><\/p>\n<p>The one of important functions for sticky note is that it is saved the position when sticky note is moved. And when the sticky note is run, it is necessary to put in the position correctly. So, it is necessary to get the position whenever it is moved.<\/p>\n<p><\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-content\/uploads\/blogger\/-qajMtbkupek\/VkOpjyEtxrI\/AAAAAAAAEic\/WHO1xyvgYiE\/s1600\/_a.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"162\" src=\"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-content\/uploads\/blogger\/-qajMtbkupek\/VkOpjyEtxrI\/AAAAAAAAEic\/WHO1xyvgYiE\/s320\/_a.png\" width=\"320\" \/><\/a><\/div>\n<p>Usually, a sticky note is moved by a mouse-drag. then, it is decided the position by mouse-up. So, it is necessary to program such that it get(and save) the mouse-up-position.<\/p>\n<div>label.MouseUp += new MouseEventHandler(MouseUpped);<\/div>\n<p>The following is the motion when it is mouse-up.<\/p>\n<div>private void MouseUpped(object sender, MouseEventArgs e){<br \/>&nbsp;if(e.Button!=MouseButtons.Left) return;<br \/>&nbsp;long x = this.Location.X;<br \/>&nbsp;long y = this.Location.Y;<\/p>\n<p>&nbsp;<span style=\"color: #274e13;\">\/\/write the code in order to save x and y position.<\/span><br \/>} <\/div>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is blog that was translated from Ja &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-csharp"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/comments?post=105"}],"version-history":[{"count":1,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":305,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/posts\/105\/revisions\/305"}],"wp:attachment":[{"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/media?parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/categories?post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pineplanter.moo.jp\/non-it-salaryman\/wp-json\/wp\/v2\/tags?post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}