、ここに何が必要ないのサンプルコードは、次のとおりです。
[DllImport("coredll.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("coredll.dll")]
public static extern IntPtr SendMessage(IntPtr hWnd, int nMsg, IntPtr wParam, IntPtr lParam);
private const int WM_MOUSEMOVE = 0x0200;
public static void RefreshTrayArea()
{
// The client rectangle can be determined using "GetClientRect" (from coredll.dll) but
// does require the taskbar to be visible. The values used in the loop below were
// determined empirically.
IntPtr hTrayWnd = FindWindow("HHTaskBar", null);
if (hTrayWnd != IntPtr.Zero)
{
int nStartX = (Screen.PrimaryScreen.Bounds.Width/2);
int nStopX = Screen.PrimaryScreen.Bounds.Width;
int nStartY = 0;
int nStopY = 26; // From experimentation...
for (int nX = nStartX; nX < nStopX; nX += 10)
for (int nY = nStartY; nY < nStopY; nY += 5)
SendMessage(hTrayWnd,
WM_MOUSEMOVE, IntPtr.Zero, (IntPtr)((nY << 16) + nX));
}
}
お役に立てば幸いです。
あなたは間違った方法で問題を解決しようとしています。なぜこれらのすべてのプロセスを最初から殺しているのですか? –
私はgprs-connectionをrasmanagerで切断していますが、プロセスはまだ実行中ですが、接続が残っていません。 ウィンドウを閉じるにはrnaapp-processを終了する必要があります これはうまくいきますが、アイコンのスペースは削除されません。 – Karl