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 DupStart
#DEFINE SW_NORMAL 1
#DEFINE SW_MAXIMIZE 3
#DEFINE SW_MINIMIZE 6
DECLARE Long FindWindow in user32 String, String
DECLARE Long BringWindowToTop in user32 Long
DECLARE Long ShowWindow in user32 Long, Long
Local lnHWND,lcTitle
lcTitle = _screen.Caption
_screen.Caption = Sys(3)
lnHWND = FindWindow(null,m.lcTitle)
_Screen.Caption = m.lcTitle
IF m.lnHWND >0
BringWindowToTop(m.lnHWND)
ShowWindow(m.lnHWND,SW_MAXIMIZE)
qUIT
ENDIF
ENDPROC
SET LIBRARY TO SYS(2004)+'foxtools.fll' ADDITIVE
* FindWindow() takes two parameters and returns the handle of the
* window, HWND, if it was found.
GetWind = RegFn('FindWindow', 'CC', 'I')
*Set the first parameter of the call to getwind to 0, null.
wclass=0
winname='My Application'
apphand=CallFn(GetWind,wclass ,winname)
*If the call was successful, stop processing.
IF apphand<>0
WAIT WINDOW ;
'You cannot start another instance of the window 'My Application'!'
QUIT
ENDIF
MODIFY WINDOW screen TITLE 'My Application'
WAIT WINDOW ;
'The first instance of the window 'My Application' is running.'
#Define AtomStrLength 512
Local lcAtomName
lcAtomName = "mon application"
Declare Integer GlobalAddAtom In win32api String
Declare Integer GlobalDeleteAtom In win32api Integer
Declare Integer GlobalGetAtomName In kernel32;
INTEGER nAtom,;
STRING @ lpBuffer,;
INTEGER nSize
findAtom(lcAtomName)
Function findAtom(tcAtom)
Create Cursor cs (atom N(12), strlen N(5), Name C(100))
Index On Allt(Name) Tag Name
For nAtom = 49152 To 65535
lpBuffer = Repli(Chr(0), AtomStrLength)
lnResult = GlobalGetAtomName (nAtom, @lpBuffer, AtomStrLength)
If lnResult > 0
Insert Into cs Values (nAtom, lnResult, Left(lpBuffer, lnResult))
Endif
Endfor
Select cs
If Seek(tcAtom)
Messagebox("Application is already running")
Quit
Else
= GlobalAddAtom(tcAtom)
Endif