コード例 #1
0
 /// <summary>
 /// プロセスの最前面固定設定を解除する
 /// </summary>
 /// <param name="process">対象プロセス</param>
 private void ProcessTopMostRelease(Process process)
 {
     if (null != process)
     {
         NativeCaller.SetWindowPos(process.MainWindowHandle,
                                   (IntPtr)NativeCaller.SpecialWindowHandles.HWND_NOTOPMOST, 0, 0, 0, 0,
                                   NativeCaller.SetWindowPosFlags.SWP_NOMOVE |
                                   NativeCaller.SetWindowPosFlags.SWP_NOSIZE);
     }
 }
コード例 #2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (null != m_GettingImageTimer)
     {
         m_GettingImageTimer.Stop();
         m_GettingImageTimer.Dispose();
         m_GettingImageTimer = null;
     }
     if (null != m_TcpClient)
     {
         ReceiveStop();
     }
     SendAllKeyUp();
     if (null != m_TargetProcess)
     {
         NativeCaller.SetWindowPos(m_TargetProcess.MainWindowHandle,
                                   (IntPtr)NativeCaller.SpecialWindowHandles.HWND_NOTOPMOST, 0, 0, 0, 0,
                                   NativeCaller.SetWindowPosFlags.SWP_NOMOVE |
                                   NativeCaller.SetWindowPosFlags.SWP_NOSIZE);
         m_TargetProcess = null;
     }
 }