{"id":689,"date":"2009-10-24T19:49:00","date_gmt":"2009-10-24T11:49:00","guid":{"rendered":""},"modified":"2013-11-17T12:46:25","modified_gmt":"2013-11-17T04:46:25","slug":"c%e6%9c%80%e5%b0%8f%e5%8c%96%e5%88%b0%e6%89%98%e7%9b%98","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/689.html","title":{"rendered":"c#\u6700\u5c0f\u5316\u5230\u6258\u76d8"},"content":{"rendered":"<p>\u4e0b\u9762\u662f\u5b9e\u73b0\u5f53\u70b9\u51fb\u6700\u5c0f\u5316\u6309\u94ae\u65f6\uff0c\u7a0b\u5e8f\u7f29\u5230\u7cfb\u7edf\u6258\u76d8\u4e2d\uff0c\u53cc\u51fb\u7cfb\u7edf\u6258\u76d8\u56fe\u6807\u65f6\uff0c\u8fd8\u539f\u7a0b\u5e8f\u3002<br \/>\n\uff11\u3001\u5efa\u4e2aWinForm\u9879\u76ee\uff0c\u5176\u5b83\u64cd\u4f5c\u7565\u8fc7\u3002<br \/>\n\uff12\u3001\u62c9\u4e2aNotifyIcon\u63a7\u4ef6\uff0c\u5c06\u5c5e\u6027Visable\u8bbe\u7f6e\u6210False\uff0c\u5728Icon\u5c5e\u6027\u4e0a\u9009\u62e9\u4e00\u4e2a\u56fe\u6807\u6587\u4ef6\u3002<br \/>\n\uff13\u3001\u5b9e\u73b0Form\u7684SizeChanged\u4e8b\u4ef6\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nif(this.WindowState == FormWindowState.Minimized)  \/\/\u5224\u65ad\u662f\u5426\u6700\u5c0f\u5316\r\n{\r\n    this.ShowInTaskbar = false;  \/\/\u4e0d\u663e\u793a\u5728\u7cfb\u7edf\u4efb\u52a1\u680f\r\n     notifyIcon.Visible = true;  \/\/\u6258\u76d8\u56fe\u6807\u53ef\u89c1\r\n}\r\n<\/pre>\n<p>\uff14\u3001\u5b9e\u73b0NotifyIcon\u63a7\u4ef6\u7684DoubleClick\u4e8b\u4ef6\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nif(this.WindowState == FormWindowState.Minimized)\r\n{\r\n    this.ShowInTaskbar = true;  \/\/\u663e\u793a\u5728\u7cfb\u7edf\u4efb\u52a1\u680f\r\n    this.WindowState = FormWindowState.Normal;  \/\/\u8fd8\u539f\u7a97\u4f53\r\n     notifyIcon.Visible = false;  \/\/\u6258\u76d8\u56fe\u6807\u9690\u85cf\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u662f\u5b9e\u73b0\u5f53\u70b9\u51fb\u6700\u5c0f\u5316\u6309\u94ae\u65f6\uff0c\u7a0b\u5e8f\u7f29\u5230\u7cfb\u7edf\u6258\u76d8\u4e2d\uff0c\u53cc\u51fb\u7cfb\u7edf\u6258\u76d8\u56fe\u6807\u65f6\uff0c\u8fd8\u539f\u7a0b\u5e8f\u3002 \uff11\u3001\u5efa\u4e2aWinForm\u9879\u76ee\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":4598,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/689\/revisions\/4598"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}