3 Replies - 653 Views - Last Post: 03 August 2012 - 07:30 PM Rate Topic: -----

#1 xerox600  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-July 12

Why is my short code not working...

Posted 03 August 2012 - 06:06 PM

Ok so I want my application to close if it has no internet connection... so I put this code in the form.load

 If My.Computer.Network.IsAvailable = False Then
            End
        End If

Why is my code not working?
Is This A Good Question/Topic? 0
  • +

Replies To: Why is my short code not working...

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2263
  • View blog
  • Posts: 9,469
  • Joined: 29-May 08

Re: Why is my short code not working...

Posted 03 August 2012 - 06:21 PM

A Network connection doesn't necessarily mean it has internet access.
Was This Post Helpful? 0
  • +
  • -

#3 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1057
  • View blog
  • Posts: 4,090
  • Joined: 02-July 08

Re: Why is my short code not working...

Posted 03 August 2012 - 07:30 PM

Using 'End' to quit a program is frowned upon. Use Me.Close or Application.Exit . How would the user know if the app even opened or checked for a connection with that setup? You have designed it to not open or tell the user anything - does that seem right?

This post has been edited by _HAWK_: 03 August 2012 - 08:11 PM

Was This Post Helpful? 0
  • +
  • -

#4 torind_2000  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 57
  • View blog
  • Posts: 292
  • Joined: 22-August 11

Re: Why is my short code not working...

Posted 03 August 2012 - 07:30 PM

unplug your Ethernet cord from your PC, or turn off your wireless
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1