|
在C#中使用热键隐含窗口(7) { SetForegroundWindow(m_hWnd); }
if (IsIconic(m_hWnd)) { ShowWindowAsync(m_hWnd,SW_RESTORE); } else { ShowWindowAsync(m_hWnd,SW_SHOWNORMAL); } } }
/// <summary> /// Collection used to enumerate Window Objects /// </summary> public class Windows : IEnumerable, IEnumerator { /// <summary> /// Win32 API Imports /// </summary> [DllImport("user32.dll")] private static extern int GetWindowText(int hWnd, StringBuilder title, int size); [DllImport("user32.dll")] private static extern int GetWindowModuleFileName(int hWnd, StringBuilder title, int size);
|