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.
Procedure displayState
Declare SHORT InternetGetConnectedState In wininet.Dll;
INTEGER @lpdwFlags, Integer dwReserved
Local lConnected
lConnected = .F.
lpdwFlags = 0
If InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
Endif
Return lConnected
Endproc
Declare SHORT InternetGetConnectedState In wininet.dll INTEGER @lpdwFlags, Integer dwReserved
Local lpdwFlags, llConnected
lpdwFlags = 0
Store InternetGetConnectedState(@lpdwFlags, 0)=1 To llConnected
? 'You are '+IIF(llConnected,'','not ')+'connected to the internet.'
lConnected = FILE('X:\filename.ext')
cFile = "\\sharename\yourappdata\yourapp.dbc" && filename of a file you know must exist on a mapped network drive or file share (UNC path)
IF FILE(cFile)
Local llNetworkavailable
TRY
OPEN DATABASE \\sharename\yourappdata\yourapp.dbc
CATCH
* unfortunately there's nothing to enforce the availability of the network
* so nothing more to do here
FINALLY
llNetworkavailable = DBUSED('yourapp')
ENDTRY
IF llNetworkavailable
? 'LAN is up, the database is opened'
Else
? 'The DBC couldn't be opened, maybe a network outage.'
Endif
You are correct. I didn't look past the first question.Chris said:...and one about LAN...