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 TForm1.Button3Click(Sender: TObject);
var
strResult : String;
strType : String;
dwFlags : DWORD;
const
INTERNET_RAS_INSTALLED = 16;
INTERNET_CONNECTION_OFFLINE = 32;
INTERNET_CONNECTION_CONFIGURED = 64;
function Check( dwFlags : DWORD; dwCheck : DWORD ) : Boolean;
begin
result := ( dwFlags AND dwCheck ) = dwCheck;
end;
begin
dwFlags := INTERNET_CONNECTION_OFFLINE;
if InternetGetConnectedState( @dwFlags, 0 ) then
strResult := 'are'
else
strResult := 'aren''t';
strType := '';
if check( dwFlags, INTERNET_CONNECTION_CONFIGURED ) then
strType := strType + 'is configured' + #10;
if check( dwFlags, INTERNET_CONNECTION_OFFLINE ) then
strType := strType + 'offline' + #10;
if check( dwFlags, INTERNET_RAS_INSTALLED ) then
strType := strType + 'RAS is installed' + #10;
if check( dwFlags, INTERNET_CONNECTION_LAN ) then
strType := strType + 'Connection through a LAN' + #10;
if check( dwFlags, INTERNET_CONNECTION_PROXY ) then
strType := strType + 'Using a proxy server' + #10;
showMessageFmt( 'Windows says you %s ' +
'connected to the Internet.' + #10#10 +
'Connection details: ' + #10 + '%s',
[ strResult, strType ] );
end;