Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Network.IsAvailable Property

Definition

Namespace:
Microsoft.VisualBasic.Devices
Assembly:
Microsoft.VisualBasic.dll
Assembly:
Microsoft.VisualBasic.Forms.dll
Source:
Network.Availability.vb
Source:
Network.Availability.vb
Source:
Network.vb
Source:
Network.vb
Source:
Network.vb

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Indicates whether a computer is connected to a network.

public:
 property bool IsAvailable { bool get(); };
public bool IsAvailable { get; }
member this.IsAvailable : bool
Public ReadOnly Property IsAvailable As Boolean

Property Value

True if the computer is connected to a network; otherwise False.

Examples

This example checks the property's status and reports it.

If My.Computer.Network.IsAvailable = True Then
 MsgBox("Computer is connected.")
Else 
 MsgBox("Computer is not connected.")
End If

Remarks

IsAvailable always returns False when called from a Click Once application or if the user does not have NetworkInformationPermission.

The following table lists examples of tasks involving the My.Computer.Network.IsAvailable property.

To See
Check whether a computer is connected to a network How to: Check Connection Status

Applies to

See also


Feedback

Was this page helpful?