Platforms to show: All Mac Windows Linux Cross-Platform

/Network/Network Interfaces
Function:
Required plugins for this example: MBS Network Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Network/Network Interfaces
This example is the version from Mon, 10th Nov 2013.
Project "Network Interfaces.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Control CheckMerge Inherits CheckBox
ControlInstance CheckMerge Inherits CheckBox
EventHandler Sub Action() update End EventHandler
End Control
EventHandler Sub Open() update End EventHandler
Sub Update() list.DeleteAllRows dim interfaces() as NetworkInterfaceMBS = NetworkInterfaceMBS.AllInterfaces(CheckMerge.Value) for each n as NetworkInterfaceMBS in interfaces dim f() as string if n.Loopback then f.Append "loopback" end if if n.Up then f.Append "active" end if if n.Broadcast then f.Append "Broadcast" end if if n.Multicast then f.Append "Multicast" end if List.AddRow n.Name, n.IPv4, n.IPv6, join(f, ", "), n.BroadcastAddress, n.NetmaskIPv4, n.NetmaskIPv6, n.MAC next // build in functions dim c as integer = System.NetworkInterfaceCount for i as integer =0 to c-1 dim n as NetworkInterface = System.GetNetworkInterface(i) const NoIPv6 = "" const NoOptions = "" const NoBroadcast = "" List.AddRow "Interface "+str(i), n.IPAddress, NoIPv6, NoOptions, NoBroadcast, n.SubnetMask, "", n.MACAddress next Title = str(UBound(interfaces)+1)+" interfaces" End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Network Plugin.

The biggest plugin in space...




Links
MBS Xojo Chart Plugins