public void Restore_Nest_Trader_Window() { Windows_Api_Class.WINDOWPLACEMENT Window_Place_Ment = Windows_Api_Class.GetPlacement(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id); // while (!Windows_Api_Class.IsWindowVisible(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id)) while (Window_Place_Ment.showCmd == Windows_Api_Class.ShowWindowCommands.Minimized || Window_Place_Ment.showCmd == Windows_Api_Class.ShowWindowCommands.Hide) { Windows_Api_Class.SetForegroundWindow(GetDesktopWindow()); Thread.Sleep(300); Windows_Api_Class.ShowWindow(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id, Windows_Api_Class.WindowShowStyle.ShowNormal); if (IsIconic(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id)) { Windows_Api_Class.ShowWindow(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id, Windows_Api_Class.WindowShowStyle.Restore); } Windows_Api_Class.SetForegroundWindow(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id); Application.DoEvents(); Thread.Sleep(300); Window_Place_Ment = Windows_Api_Class.GetPlacement(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id); if (!Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Process_Run(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Process_Id)) { return; } } }
bool Nest_Trader_Is_Visible() { Windows_Api_Class.WINDOWPLACEMENT Window_Place_Ment = Windows_Api_Class.GetPlacement(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id); if (Window_Place_Ment.showCmd == Windows_Api_Class.ShowWindowCommands.Minimized || Window_Place_Ment.showCmd == Windows_Api_Class.ShowWindowCommands.Hide || !Windows_Api_Class.IsWindowVisible(Nest_Trader_Form.Nest_Trader_Form_Instance.Nest_Trader_Id)) { return(false); } return(true); }