findwindow经常有奇怪的问题,<br>可以先用 spy++看看你的窗口名字和类型<br>然后用EnumWindows根据窗口名字和类型找出窗口的句柄<br><br>shellexecute( .....);<br>EnumWindows( @EnumWindowsProc,LongInt(self));<br><br>function EnumWindowsProc(AHWnd: HWnd;<br> LPARAM : LPARAM): boolean; stdcall ;<br>var<br> WndCaption: array[0..254] of char;<br> WndClassName: array[0..254] of char;<br> i : Integer;<br>begin<br> Result := True;<br> GetWindowText(AHWnd, @WndCaption, 254);<br> GetClassName(AHWnd, @WndClassName, 254);<br><br> // 根据 WNDCAPTION 和 WNDCLASSNAME 确定AHWND是否是目标窗口<br>end;