Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure FocusWindow(WindowName : String)
var
hWnd: DWORD;
begin
hWnd := FindWindow(nil, PChar(WindowName));
if hWnd <> 0 then
begin
ShowWindow(hwnd, 1);
SetForegroundWindow(hWnd);
SetFocus(hWnd);
end;
end;
That's not really what you want it to do. Doing that changes it to Forms.SetFocus;must be changed to just SetFocus;