Screen Property


Screen Property

Location

My.Computer.Screen

Syntax

     Dim result As System.Windows.Forms.Screen = My.Computer.Screen 

Description

The Screen property returns an object of type System.Windows.Forms.Screen, which contains various informational properties about the primary system display.

Public Members

The Screen object returned from this property includes the following notable public members.

Member

Description

AllScreens

Property. For systems with multiple attached displays, this property returns an array of all displays.

BitsPerPixel

Property. The number of color-related bits used for each pixel of the display.

Bounds

Property. Returns a Drawing.Rectangle object that identifies the bounds of the display.

DeviceName

Property. Returns the device name for the display.

Primary

Property. Indicates whether this is the primary display or not.

PrimaryScreen

Property. When using a Screen object for a secondary display, this property returns the object for the system's primary display.

WorkingArea

Property. Returns a Drawing.Rectangle object that identifies the working area of the display, which is the desktop area of the display minus any docked elements.


Usage at a Glance

  • This property is read-only.

  • This property is only valid in non-server applications.

Example

This example displays the name of the screen device.

 MsgBox("The primary screen's device name is: " & _    My.Computer.Screen.DeviceName) 

Related Framework Entries

  • Microsoft.VisualBasic.Devices.Computer.Screen Property

  • System.Windows.Forms.Screen.PrimaryScreen Class

See Also

Computer Object




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net