在C#中使用热键隐含窗口(5) /// ConstrUCts a Window Object /// </summary> /// <param name="Title">Title Caption</param> /// <param name="hWnd">Handle</param> /// <param name="Process">Owning Process</param> public Window(string Title, IntPtr hWnd, string Process) { m_Title = Title; m_hWnd = hWnd; m_Process = Process; }
//Override ToString() public override string ToString() { //return the title if it has one, if not return the process name if (m_Title.Length > 0) { return m_Title; } else { return m_Process; }