Results 1 to 9 of 9

Thread: [RESOLVED] Network Disconnect

  1. #1

    Thread Starter
    Hyperactive Member kazar's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    323

    Resolved [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

  2. #2
    Fanatic Member
    Join Date
    Oct 2004
    Posts
    751

    Re: Network Disconnect

    I'm sure theres probably API to disable it and renable it. Don't know of it off hand though.
    My Projects: [ Instant Messagener Client/Server ] [ VBPictochat ]

    My Sites:
    [ Datanethost ]
    [ Helpdesk ]

    Remember if my post was helpful then Rate This Post.

  3. #3

    Thread Starter
    Hyperactive Member kazar's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    323

    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

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    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

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Network Disconnect

    There is no reset switch but there are a couple that you can use to simulate a reset.

    VB Code:
    1. ipconfig /release [connection name] 'releases the ip on the network card.
    2. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  6. #6

    Thread Starter
    Hyperactive Member kazar's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    323

    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

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Network Disconnect

    Quote 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

  9. #9

    Thread Starter
    Hyperactive Member kazar's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Posts
    323

    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
  •  



Click Here to Expand Forum to Full Width