{"id":3324,"date":"2012-04-12T11:30:30","date_gmt":"2012-04-11T17:30:30","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/archives\/3324"},"modified":"2013-07-05T04:07:21","modified_gmt":"2013-07-04T19:07:21","slug":"windows-8-%e7%94%a8%e3%81%ae%e3%83%9f%e3%83%8b%e3%82%bd%e3%83%95%e3%83%88%e3%82%ad%e3%83%bc%e3%83%9c%e3%83%bc%e3%83%89%e3%82%92%e4%bd%9c%e3%82%8b2","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/3324","title":{"rendered":"Windows 8 \u7528\u306e\u30df\u30cb\u30bd\u30d5\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f5c\u308b(2)"},"content":{"rendered":"<p>win8 \u306e metro \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308b\u524d\u6bb5\u968e\u3068\u3057\u3066 WPF \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308c\u3070\u3088\u3044\u306e\u3067\uff08Windows Phone \u30a2\u30d7\u30ea\u3067\u3082\u3044\u3044\u306e\u3060\u3051\u3069\u3001win phone \u306e\u65b9\u306f\u79c1\u306f\u30ce\u30fc\u30bf\u30c3\u30c1\u306a\u306e\u3067\uff09\u3001\u753b\u50cf\u306e\u30bf\u30c3\u30c1\u30a4\u30d9\u30f3\u30c8\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u25a0WPF \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306b\u753b\u50cf\u3092\u8cbc\u308a\u3064\u3051<\/p>\n<p>WPF \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u753b\u50cf\u3092\u8cbc\u308a\u4ed8\u3051\u308b\u6642\u306b\u306f\u3001Image \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3092\u4f7f\u3046\u306e\u3067\u3059\u304c\u3001\u3061\u3087\u3063\u3068\u30b3\u30c4\u304c\u3044\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_01org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_01thum.jpg\" border=\"0\" \/><\/a><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;UserControl x:Class=&amp;quot;MiniSoftKey.UserControl1&amp;quot;\r\n             xmlns=&amp;quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml\/presentation&amp;quot;\r\n             xmlns:x=&amp;quot;http:\/\/schemas.microsoft.com\/winfx\/2006\/xaml&amp;quot;\r\n             xmlns:mc=&amp;quot;http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006&amp;quot;\r\n             xmlns:d=&amp;quot;http:\/\/schemas.microsoft.com\/expression\/blend\/2008&amp;quot;\r\n             mc:Ignorable=&amp;quot;d&amp;quot;\r\n             d:DesignHeight=&amp;quot;216&amp;quot; d:DesignWidth=&amp;quot;320&amp;quot;\r\n             TouchDown=&amp;quot;UserControl_TouchDown&amp;quot;\r\n             TouchUp=&amp;quot;UserControl_TouchUp&amp;quot;\r\n             TouchMove=&amp;quot;UserControl_TouchMove&amp;quot;&gt;\r\n    &lt;Grid&gt;\r\n        &lt;Image Height=&amp;quot;216&amp;quot; HorizontalAlignment=&amp;quot;Left&amp;quot; Name=&amp;quot;image1&amp;quot; Stretch=&amp;quot;Fill&amp;quot; VerticalAlignment=&amp;quot;Top&amp;quot; Width=&amp;quot;320&amp;quot;\r\n               Source=&amp;quot;\/MiniSoftKey;component\/Images\/iphone_alpha_normal.bmp&amp;quot; \/&gt;\r\n    &lt;\/Grid&gt;\r\n&lt;\/UserControl&gt;\r\n<\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u30ea\u30bd\u30fc\u30b9\u304b\u3089\u300ciphone_alpha_normal.bmp\u300d\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u3044\u308b\u3093\u3067\u3059\u304c\u3001\u666e\u901a\u306b\u300cStretch=&#8221;None&#8221;\u300d\uff08\u4f38\u9577\u3057\u306a\u3044\uff09\u3067\u5f35\u308a\u4ed8\u3051\u308b\u3068\u3001<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_02org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_02thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u306e\u3088\u3046\u306b\u62e1\u5927\u3055\u308c\u3066\u3057\u307e\u3046\u3093\u3067\u3059\u3088\u306d\u3002\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u30d5\u30a1\u30a4\u30eb\u306e\u30b5\u30a4\u30ba\u306f\u3001320&#215;216 \u306b\u3057\u3066\u3042\u308b\u306e\u3067\u3001\u4e01\u5ea6\u306a\u306f\u306a\u305a\u306a\u306e\u3067\u3059\u304c&#8230;\u3063\u3066\u3001\u3053\u308c\u306f\u753b\u9762\u306eDPI(96dpi)\u306b\u8d77\u56e0\u3059\u308b\u305d\u3046\u3067\u300c\u30c7\u30d0\u30a4\u30b9\u975e\u4f9d\u5b58\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u300d\u3068\u3044\u3046\u3082\u306e\u3092\u4f7f\u3063\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002\u30c7\u30d0\u30a4\u30b9\u975e\u4f9d\u5b58\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u3067\u8868\u793a\u3059\u308b\u3068\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306e1\u30c9\u30c3\u30c8\u3068\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u306e1\u30c9\u30c3\u30c8\u306f\u9055\u3046\u3001\u3068\u3044\u3046&#8230;DTP\u7684\u306b\u306f\u3044\u3044\u3093\u3067\u3057\u3087\u3046\u304c\u3001\u306a\u3093\u3068\u3082\u30d7\u30ed\u30b0\u30e9\u30de\u6ce3\u304b\u305b\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<p>\u3058\u3083\u3042\u300c\u30c7\u30d0\u30a4\u30b9\u4f9d\u5b58\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u300d\u3067\u8868\u793a\u3059\u308c\u3070\u826f\u3044\u306e\u3067\u306f\uff1f\u3068\u601d\u3063\u3066\u30cd\u30c3\u30c8\u3092\u63a2\u3057\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001\u306a\u3093\u3060\u304b\u3046\u307e\u3044\u65b9\u6cd5\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u306a\u306e\u3067\u3001\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001Image \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e width \u3068 height \u3092\u753b\u50cf\u306e\u7e26\u6a2a\u306b\u5408\u308f\u305b\u3066\u300cStretch=&#8221;Fill&#8221;\u300d\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u30ea\u30bd\u30fc\u30b9\u304b\u3089\u76f4\u63a5 width\/height \u3092\u53d6\u308b\u65b9\u6cd5\u3082\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u753b\u50cf\u306e\u5207\u308a\u66ff\u3048\u3082\u884c\u3046\u306e\u3067\u3001\u3053\u3093\u306a\u98a8\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u753b\u9762\u304c96DPI\u306e\u5834\u5408\u306b\u306f\u3001\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u308b\u30b5\u30a4\u30ba\u306f4\/3\u306b\u62e1\u5927\u3055\u308c\u307e\u3059\u3002\u306a\u306e\u3067\u3001\u753b\u9762\u8868\u793a\u304b\u30893\/4\u3059\u308c\u3070\u5143\u306e\u30d3\u30c3\u30c8\u30de\u30c3\u30d7\u306e\u30c9\u30c3\u30c8\u6570\u306b\u306a\u308a\u307e\u3059\u306d\u3002<\/p>\n<p>\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\uff08bmp\u30d5\u30a1\u30a4\u30eb\uff09\u81ea\u4f53\u306f\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u30d3\u30eb\u30c9\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u300cResource\u300d\u306b\u5909\u66f4\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u5148\u306e xaml \u306e\u3088\u3046\u306b\u300cSource=&#8221;\/MiniSoftKey;component\/Images\/iphone_alpha_normal.bmp&#8221;\u300d\u3067\u30a2\u30af\u30bb\u30b9\u304c\u53ef\u80fd\u3067\u3059\uff08\u3053\u308c\u306f\u81ea\u52d5\u7684\u306b\u5909\u63db\u3055\u308c\u307e\u3059\u3002\u300cMiniSoftKey\u300d\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3067\u3059\uff09\u3002<br \/>\n# \u305f\u3060\u3057\u3001metro \u306e\u5834\u5408\u306f\u3001\u9006\u306b\u300c\u30b3\u30f3\u30c6\u30f3\u30c4\u300d\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u300cms-xapp:\/\/\/\/Images\/iphone_alpha_normal.bmp\u300d\u306a\u611f\u3058\u3067\u30a2\u30af\u30bb\u30b9\u304c\u53ef\u80fd\u3067\u3059\u3002\u3053\u308c\u3082\u30cf\u30de\u308a\u307e\u3057\u305f orz<\/p>\n<p><a href=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_03org.jpg\"><img decoding=\"async\" src=\"http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2012\/04\/wpid-dworkblogimage20120412_03thum.jpg\" border=\"0\" \/><\/a><\/p>\n<p>\u25a0\u30bf\u30c3\u30c1\u30a4\u30d9\u30f3\u30c8\u306e\u53d6\u5f97<\/p>\n<p>\u30bf\u30c3\u30c1\u30a4\u30d9\u30f3\u30c8\u81ea\u4f53\u306f\u3001TouchDown\/TouchUp\/TouchMove \u3067\u53d6\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u30de\u30a6\u30b9\u3067\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306e MouseDown\/MouseUp\/MouseMove \u306b\u3042\u305f\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001TouchMove \u306e\u30a4\u30d9\u30f3\u30c8\u306f\u300c\u30bf\u30c3\u30c1\u3057\u7d9a\u3051\u3066\u3044\u308b\u72b6\u614b\u300d\u306b\u9650\u3089\u308c\u307e\u3059\u3002\u5f53\u7136\u3067\u3059\u304c\u3001\u6307\u304c\u6d6e\u3044\u3066\u3044\u308b\u9593\u306f\u30a4\u30d9\u30f3\u30c8\u306f\u53d6\u308c\u307e\u305b\u3093\u3002\u3053\u306e\u3042\u305f\u308a\u306f MouseMove \u3068\u9055\u3046\u3068\u3053\u308d\u3067\u3059\u306d\u3002\u3061\u306a\u307f\u306b\u3001metro \u30a2\u30d7\u30ea\u306e\u5834\u5408\u306f\u3001PointerDown \u306a\u3069\u306e\u30a4\u30d9\u30f3\u30c8\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nprivate void UserControl_TouchDown(object sender, TouchEventArgs e)\r\n{\r\n\tGlobalData.MainForm.label1.Text = &quot;touch down&quot;;\r\n\tTouchPoint pos = e.GetTouchPoint(this);\r\n\tGlobalData.OnMouseDown(new System.Drawing.Point((int)pos.Position.X, (int)pos.Position.Y));\r\n}\r\n\r\nprivate void UserControl_TouchUp(object sender, TouchEventArgs e)\r\n{\r\n\r\n\tGlobalData.MainForm.label1.Text = &quot;touch up&quot;;\r\n\tTouchPoint pos = e.GetTouchPoint(this);\r\n\tGlobalData.OnMouseUp(new System.Drawing.Point((int)pos.Position.X, (int)pos.Position.Y));\r\n}\r\n\r\nprivate void UserControl_TouchMove(object sender, TouchEventArgs e)\r\n{\r\n\tTouchPoint pos = e.GetTouchPoint(this);\r\n\tGlobalData.OnMouseMove(new System.Drawing.Point((int)pos.Position.X, (int)pos.Position.Y));\r\n}\r\n<\/pre>\n<p>\u30df\u30cb\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5834\u5408\u306f\u3001acer \u4e0a\u306e\u30bf\u30c3\u30c1\u30a4\u30d9\u30f3\u30c8\u3060\u3051\u3092\u5bfe\u8c61\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u672c\u6765\u306f mouse \u3068 touch \u306e\u4e21\u65b9\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u3063\u3066\u6574\u5408\u6027\u3092\u5408\u308f\u305b\u306a\u3044\u3068\u3060\u3081\u306a\u3093\u3067\u3059\u3088\u306d\u3002\u6307\u3067\u30bf\u30c3\u30c1\u3092\u3057\u3066\u3082\u3001mouse \u30a4\u30d9\u30f3\u30c8\u306f\u767a\u751f\u3059\u308b\u306e\u3067\u3001\u3053\u306e\u3042\u305f\u308a\u304c\u9762\u5012\u3067\u3059\u3002\u9006\u306b\u3001\u30c7\u30b9\u30af\u30c8\u30c3\u30d7PC\u3067\u30de\u30a6\u30b9\u64cd\u4f5c\u3057\u305f\u6642\u306f\u3001touch \u30a4\u30d9\u30f3\u30c8\u306f\u767a\u751f\u3057\u307e\u305b\u3093\u3002<br \/>\nmetro \u30a2\u30d7\u30ea\u306e\u5834\u5408\u306f\u3001mouse\/touch\/pen \u306e\u30a4\u30d9\u30f3\u30c8\u304c pointer \u3068\u3044\u3046\u3072\u3068\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u306b\u307e\u3068\u3081\u3089\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u306e\u3042\u305f\u308a\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u697d\u306b\u306a\u3063\u3066\u3044\u307e\u3059&#8230;\u304c\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u9806\u5e8f\u307e\u3067\u306f\u672a\u8abf\u67fb\u306a\u306e\u3067\u3001\u4e21\u7528\u306e\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u3068\u304d\u306b\u306f\u3069\u3046\u306a\u308b\u306e\u3084\u3089\u3002<\/p>\n<p>\u25a0\u753b\u50cf\u306e\u5207\u308a\u66ff\u3048<\/p>\n<p>\u52d5\u7684\u306b\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b\u3068\u304d\u306f\u3001BitmapImage \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u5f8c\u306b\u3001Image \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e Source \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\npublic void Form1_MouseUp(object sender, MouseEventArgs e)\r\n{\r\n\t\/\/label1.Text = &quot;mouse up&quot;;\r\n\tif (_pop != null)\r\n\t{\r\n\t\t_pop.Close();\r\n\t\t_pop = null;\r\n\r\n\t\tBPos pos = CalcBCode(e.X, e.Y);\r\n\t\t_send.Sendkey(pos.Code);\r\n\t\tif (pos.Code == &quot;shift&quot;)\r\n\t\t{\r\n\t\t\tif (_send.shift_mode == true)\r\n\t\t\t{\r\n\t\t\t\tBitmapImage bi = new BitmapImage(new Uri(@&quot;Images\/iphone_alpha_shift.bmp&quot;, UriKind.Relative));\r\n\t\t\t\tuserControl11.image1.Source = bi;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tBitmapImage bi = new BitmapImage(new Uri(@&quot;Images\/iphone_alpha_normal.bmp&quot;, UriKind.Relative));\r\n\t\t\t\tuserControl11.image1.Source = bi;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<p>\u3061\u3087\u3063\u3068\u7121\u99c4\u306a\u30b3\u30fc\u30c9\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u3093\u306a\u611f\u3058\u3002UriKind.Relative \u3092\u4ed8\u3051\u3066\u753b\u50cf\u30ea\u30bd\u30fc\u30b9\u3092\u76f8\u5bfe\u30d1\u30b9\u3067\u62fe\u3063\u3066\u304d\u307e\u3059\u3002\u591a\u5206\u3001\u5185\u90e8\u7684\u306b\u300cSource=&#8221;\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d;component\/\u300d\u304c\u4ed8\u3051\u3089\u308c\u305f\u3068\u540c\u3058\u3088\u3046\u306a\u52d5\u4f5c\u306b\u306a\u308b\u306e\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u25a0\u753b\u50cf\u306e\u3069\u306e\u30ad\u30fc\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u306e\u304b\uff1f<\/p>\n<p>\u3053\u3053\u304b\u3089\u306f\u3001\u3061\u3087\u3063\u3068\u304a\u307e\u3051\u3002\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30ce\u30a6\u30cf\u30a6\u306e\u8a71\u3002<br \/>\n\u5148\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\u306f\u5358\u306a\u308b\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u30dc\u30bf\u30f3\u81ea\u4f53\u3092\u3061\u307e\u3061\u307e\u3068\u4f5c\u3063\u3066\u3082\u826f\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3072\u3068\u307e\u305a\u67d0iPhone\u306e\u771f\u4f3c\u3092\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u307e\u3057\u305f\u3002\u3067\u3001\u3069\u306e\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3092\u8abf\u3079\u308b\u306e\u306b\u3001\u666e\u901a\u306f\u30ad\u30fc\u306e\u30b5\u30a4\u30ba\u3092\u3061\u307e\u3061\u307e\u3068\u6e2c\u3063\u3066\u3001Rectange \u3092\u30c1\u30a7\u30c3\u30af\u3059\u308c\u3070&#8230;\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u7d50\u69cb\u306a\u624b\u9593\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u3042\u3001\u4ed5\u4e8b\u306a\u3089\u305d\u308c\u3067\u3082\u3044\u3044\u3051\u3069\u3002<\/p>\n<p>\u3068\u3044\u3046\u8a33\u3067\u3001\u6b21\u306e\u3088\u3046\u306b\u5c11\u3057\u30c8\u30ea\u30c3\u30ad\u30fc\u306a\u65b9\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nprivate void InitBPos()\r\n{\r\n\t\/\/\/ \u6a19\u6e96\u30ad\u30fc\u30dc\u30fc\u30c9\r\n\t_blist = new List&lt;BPos&gt;();\r\n\t_blist.Add(new BPos { Code = &amp;quot;Q&amp;quot;, X = 15, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;W&amp;quot;, X = 47, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;E&amp;quot;, X = 82, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;R&amp;quot;, X = 111, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;T&amp;quot;, X = 145, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;Y&amp;quot;, X = 174, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;U&amp;quot;, X = 208, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;I&amp;quot;, X = 238, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;O&amp;quot;, X = 271, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;P&amp;quot;, X = 301, Y = 30 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;A&amp;quot;, X = 31, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;S&amp;quot;, X = 65, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;D&amp;quot;, X = 94, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;F&amp;quot;, X = 127, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;G&amp;quot;, X = 161, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;H&amp;quot;, X = 191, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;J&amp;quot;, X = 223, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;K&amp;quot;, X = 256, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;L&amp;quot;, X = 286, Y = 85 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;Z&amp;quot;, X = 61, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;X&amp;quot;, X = 94, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;C&amp;quot;, X = 125, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;V&amp;quot;, X = 161, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;B&amp;quot;, X = 191, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;N&amp;quot;, X = 223, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;M&amp;quot;, X = 256, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;BS&amp;quot;, X = 298, Y = 137 });\r\n\t_blist.Add(new BPos { Code = &amp;quot; &amp;quot;, X = 155, Y = 193 });\r\n\t_blist.Add(new BPos { Code = &amp;quot;n&amp;quot;, X = 279, Y = 193 });\r\n\r\n\t_blist.Add(new BPos { Code = &amp;quot;shift&amp;quot;, X = 20, Y = 137 });\r\n}\r\nprivate BPos CalcBCode(int x, int y)\r\n{\r\n\t\/\/ \u8ddd\u96e2\u304c\u8fd1\u3044\u3082\u306e\u3092\u53d6\u5f97\r\n\tint len2 = 10000;\r\n\tBPos pos = _blist&#x5B;0];\r\n\tforeach (var p in _blist)\r\n\t{\r\n\t\tint l2 = (p.X - x) * (p.X - x) + (p.Y - y) * (p.Y - y);\r\n\t\tif (l2 &lt; len2)\r\n\t\t{\r\n\t\t\tlen2 = l2;\r\n\t\t\tpos = p;\r\n\t\t}\r\n\t}\r\n\treturn pos;\r\n}\r\n<\/pre>\n<p>\u5404\u30dc\u30bf\u30f3\u306e\u4e2d\u592e\u306e\u5ea7\u6a19\u3060\u3051\u3092\u53d6\u5f97\u3057\u305f\u30ea\u30b9\u30c8\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066\u3001\u30bf\u30c3\u30c1\u3057\u305f\u5ea7\u6a19\u3068\u4e00\u756a\u8fd1\u3044\u30dc\u30bf\u30f3\u3092\u8fd4\u3059\u3001\u3068\u3044\u3046 CalcBCode \u95a2\u6570\u3067\u3059\u306d\u3002\u3053\u308c\u306f\u3001\u753b\u50cf\u51e6\u7406\u306e\u30af\u30e9\u30b9\u30bf\u30ea\u30f3\u30b0\u306e\u5fdc\u7528\u3067\u300c\u753b\u9762\u306e\u4f55\u51e6\u3092\u30bf\u30c3\u30c1\u3057\u3066\u3082\u3001\u306a\u3093\u3068\u306a\u304f\u30dc\u30bf\u30f3\u304c\u62bc\u305b\u308b\u300d\u3068\u3044\u3046\u6280\u3067\u3059\uff08\u7b11\uff09\u3002\u5168\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u306e\u3067\u3001\u6570\u304c\u591a\u3044\u5834\u5408\u306b\u306f\u30b9\u30d4\u30fc\u30c9\u304c\u554f\u984c\u306b\u306a\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3050\u3089\u3044\u306a\u3089\u3070\u5927\u4e08\u592b\u3002\u305f\u3060\u3057\u3001\u30b9\u30da\u30fc\u30b9\u30d0\u30fc\u306e\u3088\u3046\u306b\u6a2a\u306b\u9577\u3044\u5834\u5408\u306f\u3001\u4e2d\u592e\u306e\u5ea7\u6a19\u3060\u3051\u3067\u306f\u8db3\u308a\u306a\u3044\u306e\u3067\u3001\u9069\u5f53\u306b\u5de6\u53f3\u306b\u3082\u70b9\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u304c\uff08\u4e0a\u8a18\u306e\u30bd\u30fc\u30b9\u306b\u306f\u305d\u308c\u304c\u5165\u3063\u3066\u3044\u307e\u305b\u3093\uff09\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\npublic void Form1_MouseUp(object sender, MouseEventArgs e)\r\n{\r\n\t\/\/label1.Text = &quot;mouse up&quot;;\r\n\tif (_pop != null)\r\n\t{\r\n\t\t_pop.Close();\r\n\t\t_pop = null;\r\n\r\n\t\tBPos pos = CalcBCode(e.X, e.Y);\r\n\t\t_send.Sendkey(pos.Code);\r\n<\/pre>\n<p>\u5177\u4f53\u7684\u306b\u30ad\u30fc\u306e\u9001\u4fe1\u81ea\u4f53\u306f\u3001keybd_event \u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002Up\u3068Down\u3092\u304d\u3061\u3093\u3068\u5bfe\u5fdc\u3055\u305b\u306a\u3044\u3068\u99c4\u76ee\u306a\u306e\u3067\u3059\u304c\u3001\u666e\u901a\u306bIME\u3082\u4f7f\u3048\u308b\u306e\u3067\u3001\u3053\u308c\u304c\u30d9\u30b9\u30c8\u306a\u65b9\u6cd5\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nclass SendKeyCode\r\n{\r\n\t&#x5B;DllImport(&quot;user32.dll&quot;)]\r\n\tpublic static extern uint keybd_event(byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo);\r\n\tconst byte VK_SHIFT = 0x10;\r\n\tconst byte VK_CONTROL = 0x11;\r\n\tconst byte VK_MENU = 0x12;\r\n\tconst byte VK_LWIN = 0x5B;\r\n\tconst byte VK_RWIN = 0x5C;\r\n\tconst byte VK_APPS = 0x5D;\r\n\r\n\tpublic bool shift_mode = false;\r\n\r\n\tpublic void Sendkey(string code)\r\n\t{\r\n\t\t\/\/ return;\r\n\r\n\t\tif (code == &quot;shift&quot;)\r\n\t\t{\r\n\t\t\tshift_mode = !shift_mode;\r\n\t\t}\r\n\t\t#region \u7279\u6b8a\u30ad\u30fc\u30c0\u30a6\u30f3\u51e6\u7406\r\n\t\t\/*keybd_event(VK_SHIFT, 0, 0, (UIntPtr)0);\r\n            keybd_event(VK_CONTROL, 0, 0, (UIntPtr)0);\r\n            keybd_event(VK_MENU, 0, 0, (UIntPtr)0);\r\n            keybd_event(VK_LWIN, 0, 0, (UIntPtr)0);\r\n             *\/\r\n\t\tif (shift_mode) keybd_event(VK_SHIFT, 0, 0, (UIntPtr)0);\r\n\t\t#endregion\r\n\r\n\t\tbyte cd ;\r\n\t\tswitch (code)\r\n\t\t{\r\n\t\t\tcase &quot;n&quot;: cd = 13; break;\r\n\t\t\tcase &quot;BS&quot;: cd = 8; break;\r\n\t\t\tdefault:\r\n\t\t\t\tcd = (byte)char.ConvertToUtf32(code, 0);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tkeybd_event(cd, 0, 0, (UIntPtr)0);\r\n\t\tkeybd_event(cd, 0, 2\/*KEYEVENTF_KEYUP*\/, (UIntPtr)0);\r\n\r\n\t\t#region \u7279\u6b8a\u30ad\u30fc\u30a2\u30c3\u30d7\u51e6\u7406\r\n\t\t\/*keybd_event(VK_SHIFT, 0, 2, (UIntPtr)0);\r\n            keybd_event(VK_CONTROL, 0, 2, (UIntPtr)0);\r\n            keybd_event(VK_MENU, 0, 2, (UIntPtr)0);\r\n            keybd_event(VK_LWIN, 0, 2, (UIntPtr)0);\r\n             *\/\r\n\t\tif (shift_mode) keybd_event(VK_SHIFT, 0, 2, (UIntPtr)0);\r\n\t\t#endregion\r\n\t}\r\n\r\n}\r\n<\/pre>\n<p>\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9\u3067\u6253\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001<\/p>\n<ul>\n<li>\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u3068\u6570\u5b57\u306e\u5207\u308a\u66ff\u3048\u304c\u9762\u5012\u304f\u3055\u3044\u3002<\/li>\n<li>\u30ab\u30fc\u30bd\u30eb\u79fb\u52d5\u3084IME\u5909\u63db\u306e\u5834\u5408\u306b\u306f\u3001\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u304c\u3042\u3063\u305f\u307b\u3046\u304c\u826f\u3044<\/li>\n<\/ul>\n<p>\u306e\u3067\u3001\u5358\u7d14\u306b\u67d0iPhone\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u6d41\u7528\u3059\u308b\u3060\u3051\u3067\u306f\u64cd\u4f5c\u6027\u306b\u96e3\u70b9\u304c\u51fa\u307e\u3059\u3002acer \u306e\u753b\u9762\u81ea\u4f53\u3001iPhone \u3088\u308a\u3082\u5e83\u3044\u306e\u3067\u3001\u3082\u3063\u3068\u5927\u304d\u304f\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u9818\u57df\u304c\u53d6\u308c\u307e\u3059\u3002<br \/>\n\u3072\u3068\u307e\u305a\u3001\u67d0iPhone\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u79fb\u690d\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u72ec\u81ea\u306e\u30ad\u30fc\u30dc\u30fc\u30c9\uff08101\u304b106\u30ad\u30fc\u30dc\u30fc\u30c9\uff09\u306e\u30c7\u30b6\u30a4\u30f3\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\uff5e\uff5e<br \/>\n\u8ffd\u8a18 2013\/07\/05<\/p>\n<p>\u30b3\u30e1\u30f3\u30c8\u3067\u8981\u671b\u304c\u3042\u3063\u3066\u306e\u3067\u3001\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u3092\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/sdrv.ms\/17On4Fc\">http:\/\/sdrv.ms\/17On4Fc<\/a><br \/>\n\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<br \/>\n\uff08\u4e2d\u306b\u3042\u308b\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u306f\u3001\u307e\u3042\u3001\u8a66\u9a13\u7684\u306a\u753b\u9762\u30ad\u30e3\u30d7\u30c1\u30e3\u3068\u3044\u3046\u3053\u3068\u3067\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>win8 \u306e metro \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308b\u524d\u6bb5\u968e\u3068\u3057\u3066 WPF \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u308c\u3070\u3088\u3044\u306e\u3067\uff08Windows Phone \u30a2\u30d7\u30ea\u3067\u3082\u3044\u3044\u306e\u3060\u3051\u3069\u3001win phone \u306e\u65b9\u306f\u79c1\u306f\u30ce\u30fc\u30bf\u30c3\u30c1\u306a\u306e\u3067\uff09\u3001\u753b\u50cf\u306e\u30bf\u30c3\u30c1\u30a4 &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/3324\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,23],"tags":[],"class_list":["post-3324","post","type-post","status-publish","format-standard","hentry","category-dev","category-csharp"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=3324"}],"version-history":[{"count":3,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3324\/revisions"}],"predecessor-version":[{"id":4985,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/3324\/revisions\/4985"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=3324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=3324"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=3324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}