「Windowsのクリップボードを用いた選択コンテンツの取得」の版間の差分

Notion-MW
タグ: 手動差し戻し
Notion-MW
167行目: 167行目:
に従い、コンストラクタの冒頭に
に従い、コンストラクタの冒頭に


<syntaxhighlight lang="vb.net">this.Visible = false;
<syntaxhighlight lang="c#">this.Visible = false;
this.WindowState = FormWindowState.Minimized;
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;</syntaxhighlight>
this.ShowInTaskbar = false;</syntaxhighlight>
を入れると、一見消えているように見えるが、Alt+Tabなどをすると表示されているのが見えてしまうので、自分のHWNDを対象にSW_HIDEを指定してShowWindowをすると完全に消える。
を入れると、一見消えているように見えるが、Alt+Tabなどをすると表示されているのが見えてしまうので、自分のHWNDを対象にSW_HIDEを指定してShowWindowをすると完全に消える。


<syntaxhighlight lang="vb.net">case WM_SHOWWINDOW:
<syntaxhighlight lang="c#">case WM_SHOWWINDOW:
                 this.CenterToScreen();
                 this.CenterToScreen();
                 if ((int)message.WParam == 1)
                 if ((int)message.WParam == 1)
215行目: 215行目:
C&#35;の<code>NamedPipeClientStream</code>ではパイプの名前を<code>&quot;.&quot;</code> <code>&quot;test&quot;</code>とコンピュータ名/パイプ名で分けているのに対して(AutoHotkeyで呼び出されている)Win32 APIの関数<code>CreateNamedPipe</code>では<code>&quot;\\.\</code><strong><code>pipe\</code></strong><code>test&quot;</code>と書く必要があるようなので注意。
C&#35;の<code>NamedPipeClientStream</code>ではパイプの名前を<code>&quot;.&quot;</code> <code>&quot;test&quot;</code>とコンピュータ名/パイプ名で分けているのに対して(AutoHotkeyで呼び出されている)Win32 APIの関数<code>CreateNamedPipe</code>では<code>&quot;\\.\</code><strong><code>pipe\</code></strong><code>test&quot;</code>と書く必要があるようなので注意。


<syntaxhighlight lang="vb.net">using System;
<syntaxhighlight lang="c#">using System;
using System.IO.Pipes;
using System.IO.Pipes;