|
-
May 13th, 2006, 04:34 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Network Disconnect
Hey,
I'm writing a network management program in vb 6 and i was wondering if any one new of a way to reboot the network connections for the computer. i.e. turn off the network on the computer, and then turn it back on.
Thanks
Last edited by Hack; May 16th, 2006 at 01:01 PM.
Reason: Added [RESOLVED] to thread title and green "resolved" checkmark
KAZAR
The Law Of Programming:
As the Number of Lines of code increases, the number of bugs generated by fixing a bug increases exponentially.
__________________________________
www.startingqbasic.co.uk
-
May 13th, 2006, 01:20 PM
#2
Fanatic Member
Re: Network Disconnect
I'm sure theres probably API to disable it and renable it. Don't know of it off hand though.
-
May 14th, 2006, 03:39 AM
#3
Thread Starter
Hyperactive Member
Re: Network Disconnect
I would have expected there to be as well, but i can't seem to find one.
KAZAR
The Law Of Programming:
As the Number of Lines of code increases, the number of bugs generated by fixing a bug increases exponentially.
__________________________________
www.startingqbasic.co.uk
-
May 14th, 2006, 11:39 PM
#4
Re: Network Disconnect
How about ipconfig /reset? Shell it.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
May 15th, 2006, 12:35 AM
#5
Re: Network Disconnect
There is no reset switch but there are a couple that you can use to simulate a reset.
VB Code:
ipconfig /release [connection name] 'releases the ip on the network card.
ipconfig /renew [connection name] 'obtain a new ip for the network card where its set to have DHCP enabled.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 15th, 2006, 07:30 AM
#6
Thread Starter
Hyperactive Member
Re: Network Disconnect
Thanks RobDog - But one quick question - is the connection name the name of the network you are connecting to, or it's ip?
KAZAR
The Law Of Programming:
As the Number of Lines of code increases, the number of bugs generated by fixing a bug increases exponentially.
__________________________________
www.startingqbasic.co.uk
-
May 15th, 2006, 12:29 PM
#7
Re: Network Disconnect
If you only have one nic card then you dont need to use it as its optional. Its actually the name of the LAN connection for each nic card you have viewable in your network connections.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 15th, 2006, 11:34 PM
#8
Re: Network Disconnect
 Originally Posted by RobDog888
There is no reset switch but there are a couple that you can use to simulate a reset.
[Highlight=VB]ipconfig /release [connection name] 'releases the ip on the network card.
ipconfig /renew
Brain freeze on my part, Rob.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
May 16th, 2006, 08:41 AM
#9
Thread Starter
Hyperactive Member
Re: Network Disconnect
Thanks RobDog, that works perfectly, even on a wireless usb adaptor, which is great.
KAZAR
The Law Of Programming:
As the Number of Lines of code increases, the number of bugs generated by fixing a bug increases exponentially.
__________________________________
www.startingqbasic.co.uk
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|