Bring opera window to front!
- by serhiyiv
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) ;
////////////////////////////////////////////////////