I suppose I'm not doing this correctly. I dropped a TWebConnect component on my form, did not set any properties (leaving them all set to thier default settings) and executed my code and it appeared to work as expected. I then disconnected my LAN wire effectively disconnecting from the internet and tried it again and WebConnect.Connected still returns true. So what am I missing? I tired F1 help (does not have help available) and then tried to look in the document folder but could not seem to find where it is located in of of the PDF files. Any tips appreciated.
procedure TfrmMain.WmAfterShow(var Msg: TMessage);
begin
Application.ProcessMessages;
if not WebConnect.Connected then
begin
stsVersionStatus.Blinking := False;
stsVersionStatus.Caption := 'No Internet';
end
else if WebUpdate.NewVersionAvailable then
begin
stsVersionStatus.Blinking := True;
stsVersionStatus.Caption := 'Update Available';
sndPlaySound('C:\Windows\Media\Alarm01.wav', SND_ASYNC {SND_NODEFAULT Or SND_ASYNC Or SND_LOOP});
end
else
begin
stsVersionStatus.Blinking := False;
stsVersionStatus.Caption := 'Current';
end;
end;