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.
DECLARE Long FindWindow In Win32API String, String
nHWND = FindWindow(Null,_screen.caption)
If nHWND >0
=ForceForegroundWindow(nHWND)
ENDIF
FUNCTION ForceForegroundWindow(lnHWND)
LOCAL nForeThread, nAppThread
=decl()
nForeThread = GetWindowThreadProcessId(GetForegroundWindow(), 0)
nAppThread = GetCurrentThreadId()
IF nForeThread != nAppThread
AttachThreadInput(nForeThread, nAppThread, .T.)
BringWindowToTop(lnHWND)
ShowWindow(lnHWND,3)
AttachThreadInput(nForeThread, nAppThread, .F.)
ELSE
BringWindowToTop(lnHWND)
ShowWindow(lnHWND,3)
ENDIF
ENDFUNC
FUNCTION Decl
*!* DECLARE INTEGER SetForegroundWindow IN user32 INTEGER hwnd
DECLARE Long BringWindowToTop In Win32API Long
DECLARE Long ShowWindow In Win32API Long, Long
DECLARE INTEGER GetCurrentThreadId;
IN kernel32
DECLARE INTEGER GetWindowThreadProcessId IN user32;
INTEGER hWnd,;
INTEGER @ lpdwProcId
DECLARE INTEGER GetCurrentThreadId;
IN kernel32
DECLARE INTEGER AttachThreadInput IN user32 ;
INTEGER idAttach, ;
INTEGER idAttachTo, ;
INTEGER fAttach
DECLARE INTEGER GetForegroundWindow IN user32
ENDFUNC