http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/findwindow.asp

解决方案 »

  1.   

    static extern IntPtr FindWindow(string lpClassName, string lpWindowName); Declare Auto Function FindWindow Lib "user32" (ByVal lpClassName As String, _The The FindWindow API1/2/2005 2:52:55 PM - -4.65.114.36
    FindWindow function retrieves the handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows.Works hand-in-hand with The FindWindowEx API11/10/2004 11:01:10 PM - chellios at gmail dot com-80.42.70.152
    FindWindowEx*If lpClassName is NULL The FindWindow API1/2/2005 2:52:55 PM - -4.65.114.36
    FindWindow will search for the window by the lpWindowName (window's title) only. This is useful if the class of a particular window is variable.
      

  2.   

    ShowWindow
     ShowWindow(FindWindow("Shell_TrayWnd", null), 0);                static extern IntPtr FindWindow(string lpClassName, string lpWindowName);                                ShowWindow(FindWindow("Shell_TrayWnd", null), 0);                                ShowWindow(FindWindow("Shell_TrayWnd", null), 1);WinHelp