Export (0) Print
Expand All

My.Computer.Info.OSPlatform Property 

Gets the platform identifier for the operating system of the computer.


' Usage
Dim value As String = My.Computer.Info.OSPlatform
' Declaration
Public ReadOnly Property OSPlatform As String

A String containing the platform identifier for the operating system of the computer, chosen from the member names of the PlatformID enumeration.

The following condition can cause an exception:

The My.Computer.Info.OSPlatform property provides functionality similar to the Platform property of the object returned by the OSVersion property.

This example uses the My.Computer.Info.OSPlatform property to display the platform of the computer's operating system.

MsgBox("Computer's operating system platform: " & _
    My.Computer.Info.OSPlatform)

Namespace: Microsoft.VisualBasic.Devices

Class: ComputerInfo

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Availability by Project Type

Project type Available

Windows Application

Yes

Class Library

Yes

Console Application

Yes

Windows Control Library

Yes

Web Control Library

Yes

Windows Service

Yes

Web Site

Yes

No permissions are required.

Community Additions

ADD
Show:
© 2014 Microsoft