ArcObjects Library Reference  (Display)    

IScreenDisplay.TrackRotate Method

Interactively rotates the screen.

[Visual Basic 6.0]
Sub TrackRotate
[Visual Basic .NET]
Public Sub TrackRotate ( _
)
[C#]
public void TrackRotate (
);
[Java]
public void trackRotate (
)
throws
    IOException,
    AutomationException
[C++]
HRESULT TrackRotate(
void
);

Product Availability

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

Remarks

There are two approaches to rotating the display - this method and the group RotateStart, RotateMoveTo, RotateTimer, and RotateStop.  This method is the easiest to use as it takes care of all the mouse events automatically, performs the final display rotation, and invalidates the display. 

Call this method in the mouse down event and make certain you have a reference to the correct ScreenDisplay object.  For example, if you are in layout view and you want to pan just the focus map, do not use the ScreenDisplay object associated with IMxDocument::ActiveView.  Instead, get the focus Map via IMxDocument::FocusMap, and then get its ScreenDisplay.

[Visual Basic 6.0]

The following VBA code excerpt how to get the ScreenDisplay object associated with the focus map.

Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)
  Dim pScreenDisplay As IScreenDisplay
  Dim pActiveView As IActiveView
  Dim pMxDoc As IMxDocument
  Set pMxDoc = Application.Document
  Set pActiveView = pMxDoc.FocusMap
  Set pScreenDisplay = pActiveView.ScreenDisplay
  pScreenDisplay.TrackRotate
End Sub

See Also

IScreenDisplay Interface

 


Feedback Send feedback on this page