Web Pribadiku

Home » » How To Connect And Disconnect The Internet Using VB.NET

How To Connect And Disconnect The Internet Using VB.NET

Posted by CB Blogger

this is something simple , i have two ways . one is using cmd and the other one is using shell commands but the both are one line code

Connect 

#Method 1

1
Shell("cmd.exe /c ipconfig/renew")

#Method 2

1
Shell("NET START DHCP")

Disconnect

#Method 1

1
Shell("cmd.exe /c ipconfig/release")

#Method 2 

1
Shell("NET STOP DHCP")

you can use them on button click event or some click events 


0 komentar:

Post a Comment

\
\