Guest n/a Posted November 2, 2008 Report Share Posted November 2, 2008 Fala galera existe algum comando que eu possa saber se o computador esta ligado a internet ou nao ?? vlw MSN --[ lailton.webmaster@hotmail.com ]-- FiveWin 8.5 | Xharbour 1.1.0 | BCC55 | C Pelles | Designer.LIB Quote Link to comment Share on other sites More sharing options...
Guest n/a Posted November 2, 2008 Report Share Posted November 2, 2008 Fala galera existe algum comando que eu possa saber se o computador esta ligado a internet ou nao ?? vlw MSN --[ lailton.webmaster@hotmail.com ]-- FiveWin 8.5 | Xharbour 1.1.0 | BCC55 | C Pelles | Designer.LIB Quote Link to comment Share on other sites More sharing options...
cpbart Posted November 3, 2008 Report Share Posted November 3, 2008 Bem, eu faço da Seguinte maneira: IF TemNet() //Mostrar Fundo como página EndIf //Função Adaptada Function TemNet(cAddress) Local aHosts, cName Default cAddress := "www.fivewin.com.br" InetInit() aHosts := InetGetHosts(cAddress) If aHosts == Nil .or. Len(aHosts)=0 InetCleanup() return .f. endif InetCleanup() Return(.t.) clipper 5.3d, fw 2.4 / xharb 0.99.70 simplex, fwh 7.05, Pellesc , Work , MySql Quote Link to comment Share on other sites More sharing options...
Guest n/a Posted November 3, 2008 Report Share Posted November 3, 2008 Vlw Obrigado MSN --[ lailton.webmaster@hotmail.com ]-- FiveWin 8.5 | Xharbour 1.1.0 | BCC55 | C Pelles | Designer.LIB Quote Link to comment Share on other sites More sharing options...
jc Posted November 3, 2008 Report Share Posted November 3, 2008 Lailton, Há algum tempo atrás, passei por essa mesma necessidade e consegui uma boa ajuda no fivetech: http://forums.fivetechsoft.com/viewtopic.php?t=13296&start=30 -- Júlio César M. Ferreira www.rsconsultores.com.br Fone: (81) 4009.5444 Fax: (81) 4009.5400 E-mail: julio.mferreira@gmail.com MSN: julio_mferreira@hotmail.com Recife - PE FWh 8.08/ xHarbour 1.1.0/ xDevStudio 0.72/ SQL LIB 1.9/ Pelles 5.00.1 Quote Link to comment Share on other sites More sharing options...
Rikardocv Posted November 3, 2008 Report Share Posted November 3, 2008 http://www.pctoledo.com.br/forum/viewtopic.php?f=43&t=6758&p=49194#p49194 Quote Link to comment Share on other sites More sharing options...
helio1361303486 Posted November 3, 2008 Report Share Posted November 3, 2008 FUNCTION ChecaInternet() LOCAL Value:=0, retval:=0 Value:=0 retval:="" if !InternetGetConnectedState(@value,0) if MsgYesNo("Você não Esta Conectado à Internet, Deseja Conectar-se agora ?") retval:=InternetDial(GetActiveWindow(),,2,@value,0) if retval<> 0 DO WHILE .T. retval:=InternetDial(GetActiveWindow(),,2,@value,0) if retval<> 0 if MsgYesNo("Conexão não disponÃvel, Verifique sua configuração de Internet ou tentar novamente ?") LOOP endif endif exit ENDDO if !Conectado MsgStop("Conexão não disponÃvel, Verifique sua Configuração da Internet !") Return(.f.) endif endif else MsgStop("Conexão não disponÃvel, Verifique sua Configuração da Internet !") Return(.f.) endif endif Return(.t.) DLL32 FUNCTION InternetGetConnectedState( @LpDwflags AS PTR, Dwreserve AS LONG) AS BOOL PASCAL LIB "WinINet.dll" DLL32 FUNCTION InternetDial( Hwnd AS LONG, Cconnect AS LPSTR, Dwflag AS LONG, ; @Dwconnect AS PTR , Dwreserve AS LONG) AS DWORD ; PASCAL LIB "WinINet.dll" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.