1 |
using System; |
2 |
using System.Collections.Generic; |
3 |
using System.Text; |
4 |
using System.Runtime.InteropServices; |
5 |
using System.Diagnostics; |
6 |
|
7 |
namespace libWin32.Win32.Window |
8 |
{ |
9 |
public class WindowControl |
10 |
{ |
11 |
[DllImport("user32.dll")] |
12 |
static extern bool SetForegroundWindow(IntPtr hWnd); |
13 |
public static bool FocusWindow(IntPtr hWnd) { return SetForegroundWindow(hWnd); } |
14 |
|
15 |
//public static List<ManagedWinapi.Windows.SystemWindow> GetChildWindows(IntPtr parent) |
16 |
//{ |
17 |
// return FilterPCXS2GSWindows(); |
18 |
//} |
19 |
|
20 |
//private static List<ManagedWinapi.Windows.SystemWindow> FilterPCXS2GSWindows() |
21 |
//{ |
22 |
// return new List<ManagedWinapi.Windows.SystemWindow>(ManagedWinapi.Windows.SystemWindow.FilterToplevelWindows(new Predicate<ManagedWinapi.Windows.SystemWindow>(PCSX2WindowsLookupFilter))); |
23 |
//} |
24 |
//private static bool PCSX2WindowsLookupFilter(ManagedWinapi.Windows.SystemWindow window) |
25 |
//{ |
26 |
// if (window.ClassName.ToLower().Contains("wxwindowclassnr")) |
27 |
// { |
28 |
// // window is correct class |
29 |
|
30 |
// if (window.Title.ToLower().StartsWith("gs")) |
31 |
// { |
32 |
// return true; |
33 |
// } |
34 |
// } |
35 |
// return false; |
36 |
//} |
37 |
} |
38 |
} |