Saturday, March 17, 2012

How to Connect/Disconnect from Internet using VB.net

 Private Sub Connect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click  
   
     Shell("cmd.exe /c ipconfig/renew")  
     MsgBox("connected")  
   
 End Sub  

 Private Sub Disconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click  
   
     Shell("cmd.exe /c ipconfig/release")  
     MsgBox("Disconnected")  
   
 End Sub  

Reactions:

2 comments:

thanks bro, i wanna know about that thing, if u dont mind, actually some we connects to the internet, but we did not receive any data from internet, so , its similar case of disconnecting, can we check data is coming or not......................................... ?

thanks bro, but u have another idea, becoz, in window 7 and window 8 can easily solve that problem , when we disconnect internet,,, they can solve that puzzle by troublshooting ............. any other method to connect and disconnect internet .

Post a Comment