procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> if GetSystemMetrics(SM_NETWORK) AND $01 = $01 then<br> ShowMessage('Machine is attached to network') else<br> ShowMessage('Machine is not attached to network');<br>end;