Screen Property
Collapse the table of content
Expand the table of content

Computer.Screen Property

 

Gets the Screen object that represents the computer's primary display screen.

Namespace:   Microsoft.VisualBasic.Devices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public Screen Screen { get; }

Property Value

Type: System.Windows.Forms.Screen

A Screen object that represents the computer's primary screen.

The My.Computer.Screen property provides functionality similar to the PrimaryScreen property.

Project type

Available

Windows Forms Application

Yes

Class Library

Yes

Console Application

Yes

Windows Forms Control Library

Yes

Web Control Library

No

Windows Service

Yes

Web Site

No

This example uses the WorkingArea property of the My.Computer.Screen property to determine the working area of the computer's primary display, and then resizes the form to fill the working area.

Private Sub EnlargeForm()
    Me.Size = My.Computer.Screen.WorkingArea.Size
    Me.Location = New System.Drawing.Point(0, 0)
End Sub

This example needs to run in a Windows Forms application.

FileIOPermission

Controls the ability to access files and folders. Associated enumeration: Unrestricted.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft