.NET code to get Information of programme
Posted On at by milanPublic Class clsSystemInfo
Public Function BootMode() As String
' Normal: The computer started in the standard mode
'FailSafe: The computer started with only the basic
'files and drivers to run locally
'FailSafeWithNetwork: The computer started with the
'basic files, drivers, etc to run on network
Return SystemInformation.BootMode.ToString
End Function
Public Function ComputerName() As String
'the computername
Return SystemInformation.ComputerName
End Function
Public Function DBCSEnabled() As Boolean
'returns true if system is capable of
'handling double-byte character set (DBCS) characters.
Return SystemInformation.DbcsEnabled
End Function
Public Function MenuFontName() As String
'operating system font name for menus
Return SystemInformation.MenuFont.FontFamily.Name
End Function
Public Function MenuFontSize() As Integer
'operating system font name for menus
Return SystemInformation.MenuFont.Size
End Function
Public Function MenuHeight() As Integer
'height of one menu line in pixel
Return SystemInformation.MenuHeight
End Function
Public Function MidEastEnabled() As Boolean
'true if system supports Hebrew and Arabic languages.
Return SystemInformation.MidEastEnabled
End Function
Public Function MonitorCount() As Integer
'How many monitors
Return SystemInformation.MonitorCount
End Function
Public Function MouseButtons() As Integer
'How many mouse buttons
Return SystemInformation.MouseButtons
End Function
Public Function MousePresent() As Boolean
'is mouse present
Return SystemInformation.MousePresent
End Function
Public Function MouseWheelPresent() As Boolean
'is mouse with mouse wheel present
Return SystemInformation.MouseWheelPresent
End Function
Public Function isConnectedToNetwork() As Boolean
'connection to network present?
Return SystemInformation.Network
End Function
Public Function PenWindows() As Boolean
'Are Microsoft Windows for Pen Computing extensions installed
Return SystemInformation.PenWindows
End Function
Public Function PrimaryMonitorSize() As String
'Size of primary monitor
Return SystemInformation.PrimaryMonitorSize.ToString
End Function
Public Function Secure() As Boolean
'is security present on operating system
Return SystemInformation.Secure
End Function
Public Function UserDomainName() As String
'the domain name for the current user
Return SystemInformation.UserDomainName
End Function
Public Function UserInteractive() As Boolean
'is current process running in user-interactive mode.
Return SystemInformation.UserInteractive
End Function
Public Function UserName() As String
'user name
Return SystemInformation.UserName
End Function
Public Function WorkingArea() As String
Return SystemInformation.WorkingArea.ToString
End Function
End Class