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 loForm
loForm = CREATEOBJECT("FormSMS")
loForm.Show() && modeless (top-level form can't be modal)
READ EVENTS
_screen.visible = .T.
DEFINE CLASS FormSMS AS Form
ShowWindow = 2 && top-level form
PROCEDURE Init
_screen.visible = .f.
ENDPROC
ADD OBJECT cmdClose AS CloseButton
ENDDEFINE
DEFINE CLASS CloseButton as CommandButton
PROCEDURE Click
CLEAR EVENTS
ENDDEFINE
* // should be placed in config.fpw. that way NO _screen flashing will happen
* // however, within this demo and in designmode its enough to place it at the
* // beginning of you startup programm
_screen.Visible = .F.
* // now, we instantiate a class based form that is already prepared to live
* // without _screen and can exist as TopLevelForm
SET CLASSLIB TO clbForms
oMasterForm = CREATEOBJECT( [frmMasterform] )
oMasterForm.Visible = .T.
READ EVENTS
* // in case we are in designmode, it is good to make the _screen visible again.
* // otherwise you will have to end the VFP process via taskmanager!!!!
IF _VFP.StartMode = 0
_Screen.Visible = .T.
ENDIF
Desktop: .T.
ShowWindow: 2-AsTopLevelForm
WindowType: 0-Modeless (As we have a READ EVENTS in the starting prg)
CLEAR EVENTS
* // Code in Form.INIT
BINDEVENT( Thisform.cmdClose , [Click] , Thisform , [Release] )
* // Code in Form.RELEASE
UNBINDEVENTS( Thisform.cmdClose , [Click] , Thisform , [Release] )
CLEAR EVENTS