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.
'In the module:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'for the timeout function
Public g_intMinute As Integer
Public Function SetProgramEndTimer()
'reset/set/initialize program timer for time-out function due to inactivity
g_intMinute = 0
'set the timer for 10 minutes
frmMenuMain.Timer1.Interval = 60000
'enable the timer to keep track
frmMenuMain.Timer1.Enabled = True
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
'In first menu - Main the timer code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Sub Timer1_Timer()
g_intMinute = g_intMinute + 1
If g_intMinute = 10 Then
' turn off the timer
Timer1.Enabled = False
MsgBox "The program has ended due to inactivity." & _
Chr(13) & Chr(13) & "Please login again.", vbInformation
'end program
End
End If
End Sub
Public Sub Timer1_Timer()
If g_intminute > 0 then
' turn off the timer
Timer1.Enabled = False
'Hide all visible forms
For Each Form in [i]ProjectName[/i]
Form.Hide
Next
'Display MsgBox
'(vbCrLf is a Carriage Return Line Feed Constant
MsgBox "The program has ended due to inactivity." & _
vbCrLf & "Please login again.", _
vbInformation + vbOKOnly, _
"Inactivity Termination"
'end program
End
End If
'Increment g_intMinute
g_intMinute = g_intMinute + 1
End Sub
Public Sub TRS()
'Reset Flag variable
g_intMinute = 0
'De- and Re-initialise the Timer
[i]Timer1[/i].Enabled = False
[i]Timer1[/i].Enabled = True
End Sub
Private Sub cmdSueMe_Click()
Call TRS
....Rest of Click Event....
End Sub