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.
LOCAL lcHwnd1, lcHwnd2
lcHwnd2 = 0
DECLARE INTEGER FindWindowEx in win32api as apiFindWindowEx ;
INTEGER nParent, INTEGER nChildAfter, ;
STRING cClass, STRING cName
*If you're on VFP6, you'll have to find THISFORM's hWnd value a different way:
lcHwnd1 = apiFindWindowEx( THISFORM.HWnd, 0, 'CtlFrameWork_ReflectWindow', 0 )
IF lcHWnd1>0
lcHwnd2 = apiFindWindowEx( lcHwnd1, 0, 'ListView20WndClass', 0 )
ENDIF
RETURN lcHwnd2
LPARAMETERS tnCX, tnCY
*!* LVM_FIRST=0x1000
*!* LVM_SETICONSPACING = LVM_FIRST + 53 = 4149
LOCAL lnHWND, lnLPrm
lnHWND = THIS.GetHwnd()
IF lnHWND>0
LVM_SETICONSPACING = 4149
DECLARE LONG SendMessage IN WIN32API as apiSendMessage ;
LONG whnd, LONG Msg, SHORT WParam, LONG LParam
lnLPrm = BITLSHIFT(tnCX,16) + tnCY
apiSendMessage( lnHWND, LVM_SETICONSPACING, 0, lnLPrm )
ENDIF
LPARAMETERS tnBkClr
*!* LVM_FIRST=0x1000
*!* LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 = 4134
LOCAL lnHWND, lnLPrm, LVM_SETTEXTBKCOLOR, lnBkClr
lnHWND = THIS.GetHwnd()
IF lnHWND>0
* If no color spec'd, default to clear:
lnBkClr = IIF(VARTYPE(tnBkClr)='N', tnBkClr, 0xFFFFFFFF )
LVM_SETTEXTBKCOLOR = 4134
DECLARE LONG SendMessage IN WIN32API as apiSendMessage ;
LONG whnd, LONG Msg, SHORT WParam, LONG LParam
lnLPrm = BITLSHIFT(tnCX,16) + tnCY
apiSendMessage( lnHWND, LVM_SETTEXTBKCOLOR, 0, lnBkClr )
ENDIF
THISFORM.lstView.SetIconSpacing(100,100)
THISFORM.lstView.SetTextBkColor() && Defaults to clear