Enables you to access certain properties of the networking environment. You access the Network module from the System module.
DNSAddress As String
IsConnected As Boolean
Returns True if connected to a Network.
This example tests whether the user is connected to the Network.
If System.Network.IsConnected Then MessageBox("You're connected to the network.") Else MessageBox("You're not connected to the network.") End If
Looks up the passed DNS address and returns its IP address as a String.
The following call returns the IP address for the wikipedia.org domain name.
Var s As String s = System.Network.LookupIPAddress("wikipedia.org") If s <> "" Then MessageBox(s) Else MessageBox("An error occurred") End If
Wakes up a remote computer on the LAN, assuming the computer supports this feature.
You can pass a broadcast address, an IP address, or a MAC address of the machine you want to wake up.
This example wakes up a local computer on the Network.
The LookupDNSAddress and LookupIPAddress methods return empty strings on errors but return the string that was passed to the function if the address could not be resolved.
The following call returns the IP address for Wikipedia.
Var IPAddress As String IPAddress = System.Network.LookupIPAddress("wikipedia.org") If IPAddress <> "" Then MessageBox(IPAddress) Else MessageBox("An error occurred") End If
All project types on all supported operating systems.