{"id":883,"date":"2024-01-17T23:59:32","date_gmt":"2024-01-17T14:59:32","guid":{"rendered":"https:\/\/web.cloudfree.jp\/journal\/?p=883"},"modified":"2024-01-22T15:50:59","modified_gmt":"2024-01-22T06:50:59","slug":"vba%e3%81%8b%e3%82%89powershell-net%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%a6notify","status":"publish","type":"post","link":"https:\/\/web.cloudfree.jp\/journal\/vba%e3%81%8b%e3%82%89powershell-net%e3%83%a9%e3%82%a4%e3%83%96%e3%83%a9%e3%83%aa%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%a6notify\/","title":{"rendered":"VBA\u304b\u3089PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u3066Notify"},"content":{"rendered":"<h3 class=\"wp-block-post-title\">VBA\u304b\u3089PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u3066Notify<\/h3>\n\n\n<p class=\"has-tertiary-color has-text-color has-background has-small-font-size\" style=\"background-color:#8d8dd8;margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\">2024-01-17 \u8a18\u8f09<br>\u6982\u8981 : VBA\u304b\u3089PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3059\u308b<br>Keyword : PowerShell, WshShell, VBA, Excel<\/p>\n\n\n\n<p>PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea \u306e\u6d3b\u7528\u65b9\u6cd5(\u305d\u306e\uff12)\u306f\u3001UI\u3092\u4e71\u3055\u306a\u3044\u901a\u77e5\u3002<br><br>VBA\u3067\u901a\u77e5\u3068\u3044\u3048\u3070MsgBox\u3067\u3059\u304c\u3001\u901a\u77e5\u3092\u3059\u308b\u306b\u305b\u3088\u3001\u30e2\u30fc\u30c0\u30eb\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u51fa\u3057\u3083\u3070\u308a\u3059\u304e\u3068\u601d\u3046\u30b1\u30fc\u30b9\u304c\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u3046\u3044\u3046\u3068\u304d\u306b\u3001\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\u304b\u3089\u30d4\u30b3\u30fc\u30f3\u3068\u51fa\u3066\u304f\u308b\u901a\u77e5\u3002MySQL\u3084Apache\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u9045\u5ef6\u8d77\u52d5\u3055\u305b\u3066\u3044\u308b\u3068\u304d\u306b\u30b5\u30fc\u30d3\u30b9\u958b\u59cb\u3092\u77e5\u3089\u305b\u3066\u304f\u308c\u308b\u3042\u306e\u901a\u77e5\u3067\u3059\u3002<br><br>\u3053\u308c\u3082.Net\u3067\u51fa\u305b\u308b\u3068\u308f\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u5099\u5fd8\u9332\u3092\u304b\u306d\u3066\u3042\u3052\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Public Sub notify(ByVal sTitle As String, ByVal sMessage As String)\n    Dim wsh As New IWshRuntimeLibrary.WshShell &#39;CreateObject(&quot;Wscript.Shell&quot;)\n    Dim sCmd  As String\n    \n    sCmd = &quot;powershell.exe -command &quot; & Chr(34) & &quot;& { &quot;\n    sCmd = sCmd & &quot;[reflection.assembly]::loadwithpartialname(&#39;system.windows.forms&#39;)&quot;\n    sCmd = sCmd & &quot;; [reflection.assembly]::loadwithpartialname(&#39;system.drawing&#39;)&quot;\n    sCmd = sCmd & &quot;; $notify = new-object system.windows.forms.notifyicon&quot;\n    sCmd = sCmd & &quot;; $notify.icon = [system.drawing.systemicons]::information&quot;\n    sCmd = sCmd & &quot;; $notify.visible = $true&quot;\n    sCmd = sCmd & &quot;; $notify.showballoontip(500, &#39;&quot; & sTitle & &quot;&#39;,&quot;\n    sCmd = sCmd & &quot;&#39;&quot; & sMessage & &quot;&#39;,[system.windows.forms.tooltipicon]::none)&quot;\n    sCmd = sCmd & &quot; }&quot; & Chr(34)\n    \n    wsh.Run sCmd, 0 &#39; 0=Window\u975e\u8868\u793a\nEnd Sub\n<\/code><\/pre><\/div>\n\n\n\n<p>\u79c1\u81ea\u8eab\u3001PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u6587\u6cd5\u304c\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u7121\u99c4\u304c\u3042\u308b\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u30de\u30a4\u74b0\u5883\u3067\u306f\u3053\u308c\u3067\u3046\u307e\u304f\u3044\u3063\u3066\u307e\u3059\u3002<br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell+.Net\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7528\u3044\u3066VBA\u3067\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\u304b\u3089\u51fa\u3066\u304f\u308b\u901a\u77e5\u3092\u51fa\u3059\u65b9\u6cd5\u3002<\/p>\n","protected":false},"author":1,"featured_media":884,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"wp-custom-template-x24-index","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[148,149,86,45],"_links":{"self":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/883"}],"collection":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/comments?post=883"}],"version-history":[{"count":0,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media\/884"}],"wp:attachment":[{"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web.cloudfree.jp\/journal\/wp-json\/wp\/v2\/tags?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}