№1
function InetIsOffline(flag: integer): WordBool; stdcall; external 'url.dll';
-------------------------------------------------------------
if InetIsOffline(0)
then ShowMessage('This computer is not connected to Internet!')
else ShowMessage('You are connected to Internet!');
№2
uses ..., WinInet;
-------------------------------------------------------------
if InternetCheckConnection(nil,$00000001,0)
then showmessage('est inet')
else showmessage('net ineta');
№3
if GetSystemMetrics(SM_NETWORK) and $01 = $01
then ShowMessage('Computer is attached to a network!')
else ShowMessage('Computer is not attached to a network!');