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.
#Define GW_HWNDNEXT 2
#Define GW_CHILD 5
#Define GWL_STYLE -16
#Define WS_VISIBLE 0x10000000
#Define WS_POPUP 0x80000000
Declare Long GetWindow In WIN32API Long HWnd, Long uCmd
Declare Long GetWindowText In WIN32API Long HWnd, String @lpString, Long nMaxCount
Declare Integer GetDesktopWindow In Win32API
Declare Long GetWindowLong In WIN32API Long HWnd, Long nIndex
DECLARE INTEGER IsIconic IN user32 INTEGER hWnd
Create Cursor crsWindows ( ;
hwnd I, WindTitle C(50),isIconic L)
lhWnd = GetDesktopWindow()
lhWnd = GetWindow(lhWnd, GW_CHILD)
Do While lhWnd > 0
m.WindTitle = GetTitle(lhWnd)
If Not Empty(m.WindTitle)
m.hwnd = lhWnd
m.Style = GetWindowLong(lhWnd, GWL_STYLE)
m.hex = Transform(m.Style, "@0")
m.isiconic = IIF(IsIconic(lhWnd)=0,.f.,.t.)
If Bitand(m.Style, WS_VISIBLE) > 0 ;
AND Bitand(m.Style, WS_POPUP) = 0
Insert Into crsWindows From Memvar
Endif
Endif
lhWnd = GetWindow(lhWnd, GW_HWNDNEXT )
Enddo
SELECT crsWindows
LOCATE
Browse Nowait
Return
Function GetTitle(lhWnd)
Local lcTitle
lcTitle = Space(512)
lnTitle = GetWindowText(lhWnd , @lcTitle, 256)
If lnTitle > 0
lcTitle = Left(lcTitle, lnTitle )
Else
lcTitle = ""
Endif
Return lcTitle