你能帮我弄清楚如何使用类名将 Opera 的窗口放在前面吗?!我使用以下过程将其他应用程序放在前面,它工作正常。我只需要使用一个类名而不是窗口的标题。如果我改用窗口标题,则该过程有效。这是程序:
procedure SwitchToThisWindow(h1: hWnd; x: bool); stdcall;
external user32 Name 'SwitchToThisWindow';
procedure Opera;
var
Wnd:HWND;
begin
Wnd:= FindWindow(PChar('OpWindow'),nil);
if (Wnd <> 0) then SwitchToThisWindow(Wnd, True) ;
////////////////////////////////////////////////////