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.
LPARAMETERS tcPicture, tcMessage
WITH THIS.cntStatusBar
DO CASE
CASE EMPTY(tcPicture) AND EMPTY(tcMessage)
.imgIcon.Visible = .F.
.lblMessage.Left = 0
.lblMessage.Caption = []
CASE EMPTY(tcPicture)
.imgIcon.Visible = .F.
.lblMessage.Left = 0
.lblMessage.Caption = tcMessage
OTHERWISE
IF ADIR(laTemp,FULLPATH(tcPicture)) = 1 && Image exists
.imgIcon.Visible = .T.
.imgIcon.Picture = FULLPATH(tcPicture) && tcPicture
.lblMessage.Left = 20
ENDIF
.lblMessage.Caption = tcMessage
ENDCASE
ENDW
DODEFAULT()
oStatusbar.mMessage(THIS.Picture,THIS.StatusBarText)
DODEFAULT()
oStatusbar.mMessage([],[])
* *************************************
* Procedure: CaptureStatusBarText
* Syntax: DO CaptureStatusBarText
* *************************************
PROCEDURE CaptureStatusBarText
*!* Also required
SET MESSAGE TO
SET STATUS BAR OFF
SET STATUS ON
#define GWL_WNDPROC (-4)
#define WM_ENTERIDLE 0x0121
#define MSGF_DIALOGBOX 0
#define MSGF_MESSAGEBOX 1
#define MSGF_MENU 2
#define MSGF_SCROLLBAR 5
PUBLIC oHandler
oHandler = NEWOBJECT([StatusBarText])
BINDEVENT(_VFP,[STATUSBAR],oHandler,[STATUSBAR_CHANGE],1)
BINDEVENT(_vfp.HWnd,WM_ENTERIDLE,oHandler,[HandleMsg],5)
DEFINE CLASS StatusBarText AS Session
dwOrigWindProc=0
PROCEDURE init
DECLARE integer GetWindowLong IN WIN32API ;
integer hWnd ,;
integer nIndex
DECLARE integer CallWindowProc IN WIN32API ;
integer lpPrevWndFunc ,;
integer hWnd ,;
integer Msg ,;
integer wParam ,;
integer lParam
THIS.dwOrigWindProc = GetWindowLong(_VFP.HWnd,GWL_WNDPROC)
PROCEDURE HandleMsg(hWnd as Integer, msg as Integer, wParam as Integer, lParam as Integer)
LOCAL nRetvalue
nRetvalue=0
DO CASE
CASE msg = WM_ENTERIDLE
IF wParam = MSGF_MENU
* Call default processing to set menu message
nRetvalue = CallWindowProc(THIS.dwOrigWindProc,hWnd,msg,wParam,lParam)
IF [|] $ _vfp.StatusBar
oStatusbar.mMessage(LEFT(_vfp.StatusBar,AT([|],_vfp.StatusBar) - 1),;
SUBSTR(_vfp.StatusBar,AT([|],_vfp.StatusBar) + 1))
ELSE
oStatusbar.mMessage([],_vfp.StatusBar)
ENDI
ENDIF
ENDCASE
RETURN nRetvalue
PROCEDURE StatusBar_Change
RETURN
ENDDEFINE