function SetIEOfflineMode (Const isOffline:Boolean):Boolean; //设定浏览器为离线状态 var ConInfo:INTERNET_CONNECTED_INFO; begin if isOffline then begin ConInfo.dwConnectedState := INTERNET_STATE_DISCONNECTED_BY_USER; end else begin ConInfo.dwConnectedState := INTERNET_STATE_CONNECTED; end; ConInfo.dwFlags := ISO_FORCE_DISCONNECTED; Result := InternetSetOption(nil, INTERNET_OPTION_CONNECTED_STATE, @ConInfo, sizeof(ConInfo)); end;