速记:两个进程模拟模态窗口

if IsWindow(Handle) then // If the application exists... begin WaitForInputIdle(HProcess, INFINITE); SetWindowLong(Handle, GWL_HWNDPARENT, Self.Handle); EnableWindow(Self.Handle, False); //WindowList := DisableTaskWindows(hProcess); MsgWaitForSingleObject(hProcess); EnableWindow(Self.Handle, True); // EnableTaskWindows(WindowList); end; Application.Restore; SetForeGroundWindow(Self.Handle); // SendMessage(Self.Handle, WM_SYSCOMMAND, // SC_MINIMIZE // , 0); //SendMessage(Self.Handle, WM_ACTIVATE,1 , 0);

你可能感兴趣的:(application)