NetworkAvailabilityChanged Event (My.Computer.Network)


NetworkAvailabilityChanged Event (My.Computer.Network)

Location

My.Computer.Network.NetworkAvailabilityChanged

Syntax

     Public Sub MyComputerNetwork_NetworkAvailabilityChanged( _        ByVal sender As Object, _        ByVal e As NetworkAvailableEventArgs)     End Sub 

Elsewhere:

     AddHandler My.Computer.Network.NetworkAvailabilityChanged, _        AddressOf MyComputerNetwork_NetworkAvailabilityChanged 


sender (required; Object)

The control or object that raised the event


e (required; NetworkAvailableEventArgs)

An event parameter that contains information about the network, using the Microsoft.VisualBasic.Devices.NetworkAvailableEventArgs class.

Description

The NetworkAvailabilityChanged event occurs whenever the network availability changes.

Public Members

The e argument for this event, as an instance of the NetworkAvailableEventArgs class, includes the following notable public members.

Member

Description

IsNetworkAvailable

Property. A Boolean that indicates whether the new state of the network is available (TRue) or not (False)


Usage at a Glance

  • This event is available to any type of application. A similar event, only available in Windows Forms applications, exists in the My.Application object. See the NetworkAvailabilityChangedEvent (My.Application) entry in this chapter for information on that event.

  • You cannot use the Handles keyword when defining the event procedure for this event. You must attach the event procedure to the event using the AddHandler statement.

  • This event does not occur on Windows 95 and Windows 98 systems.

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Network Class

  • Microsoft.VisualBasic.Devices.NetworkAvailableEventArgs Class

See Also

Network Object, NetworkAvailabilityChanged Event (My.Application)




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net