ArcObjects Library Reference (Carto)  

IActiveView.ScreenDisplay Property

The screen display used by the view.

[Visual Basic .NET]
Public ReadOnly Property ScreenDisplay As IScreenDisplay
[C#]
public IScreenDisplay ScreenDisplay {get;}
[C++]
HRESULT get_ScreenDisplay(
  IScreenDisplay** screen
);
[C++]

Parameters

screen [out, retval]

  screen is a parameter of type IScreenDisplay

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Each view has a ScreenDisplay object which controls drawing in the application's window.  Use this property to get a reference to the ScreenDisplay object associated with the view you are currently working with.  For example, to draw a polygon in data view, you must get an IActiveView reference on the focus Map object and then get a reference to its ScreenDisplay object via this property.  If you are in data view and you mistakenly get an IActiveView reference on the PageLayout object, you will not see the polygon as you are drawing in the wrong view.

Each ScreenDisplay object has a DisplayTransformation object which is accessible via IDisplay::DisplayTransformation (ScreenDisplay inherits from Display ).  Each DisplayTransformation related to a Map, holds onto the map's spatial reference (IDisplayTransformation::SpatialReference ) and has useful methods for converting between device units and map units. The PageLayout's DisplayTransformation does not have a spatial reference, the property returns nothing, and in this case its members map between device units and page units.

See Also

IActiveView Interface

.NET Snippets

Draw Rectangle | Draw Polyline | Convert Display Pixels to Map Units | Get Polyline From Mouse Clicks | Do Identify | Get Screen Coordinates from Map Coordinates | Get Map Coordinates from Screen Coordinates | Draw Point | Draw Polyline Using Input Geometry |

.NET Samples

Building a MapViewer application using the ArcGIS Engine controls (Code Files: MapViewer) | Copy the PageLayoutControl focus map and overwrite the MapControl map (Code Files: CopyFocusMap) | Create a custom tool (Code Files: DrawGraphicLine) | Custom map navigation commands (Code Files: Pan) | Custom UI elements using add-ins (Code Files: AddGraphicsTool) | Dynamic display animated zoom (Code Files: AnimatedZoomInTool AnimatedZoomOutTool) | Make a custom time slider (Code Files: CustomTimeSliderButton) | Move a graphic along a path in ArcMap (Code Files: MapGraphicKeyframe) | Print multiple pages (Code Files: PrintMultiPagesVB_NET_Addin) | RSS weather layer (Code Files: AddRSSWeatherLayer WeatherItemSelectionDlg) |

.NET Related Topics

Building a map viewing application using the ArcGIS Engine controls | Create a custom tool | Display events | How to add display caching | How to draw a point on the screen | How to draw a polygon on the screen | How to draw a polyline on the screen | How to draw a rectangle on the screen | How to get screen coordinates from map coordinates | How to set output image quality | Working with map surrounds | Working with PageLayout elements |