Get the screen size

Module Module1

Sub Main()
Dim height As Integer = My.Computer.Screen.Bounds.Height
Dim width As Integer = My.Computer.Screen.Bounds.Width
Console.WriteLine(width & ” by ” & height)
Console.ReadLine() ‘wait for user input
End Sub

End Module

list serial ports

Module Module1

Sub Main()
For Each portName As String In My.Computer.Ports.SerialPortNames
Console.WriteLine(portName)
Next
Console.ReadLine() ‘wait for user input

End Sub

End Module

Is network available

Module Module1

Sub Main()

Dim isAvailable As Boolean
isAvailable = My.Computer.Network.IsAvailable
If (isAvailable) Then
Console.WriteLine(“Network is available”)
End If
Console.ReadLine() ‘Wait for key to be pressed
End Sub

End Module