日期:2014-05-18 浏览次数:20876 次
[DllImport("user32.dll")] private static extern int FindWindow(string className, string windowText); [DllImport("user32.dll")] private static extern int FindWindowEx(int hWnd1, int hWnd2, string lpsz1, string lpsz2); private void Button_Click(object sender, RoutedEventArgs e) { int handle0 = FindWindow("Shell_TrayWnd", null); int handle1 = FindWindowEx(handle0, 0, "ReBarWindow32", null); int handle2 = FindWindowEx(handle1, 0, "MSTaskSwWClass", null); int handle3 = FindWindowEx(handle2, 0, "ToolbarWindow32", null); }