Bring opera window to front!

Posted by serhiyiv on Stack Overflow See other posts from Stack Overflow or by serhiyiv
Published on 2010-04-25T12:29:42Z Indexed on 2010/04/25 12:33 UTC
Read the original article Hit count: 160

Filed under:
|
|

Hi! Could you please help me to figure out how to bring Opera's window to front, using class name?! I use the following procedure to bring other applications to front and it works fine. I need to use only a class name and not window's caption. If I use window caption instead, the procedure works. Here is the procedure:

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) ; ////////////////////////////////////////////////////

© Stack Overflow or respective owner

Related posts about window

Related posts about activate