I want to draw a graphic in current visible portion of the map.I am using
DrawGraphic(0,0,0axMapControl.Width, axMapControl.Height) in stand-alone ArcEngine application.Both Height and Width in this case return Integer.What is the equivalent of this,if the same has to be done in ArcMap.?
Do you want to get the width and height of map, or do you want the method to draw graphics? If you want equivalent of axMapControl.width and height, then get active view first, then get ActiveView.Extent (ArcObjects Help for .NET developers) It returns IEnvelope, which has height and width (ArcObjects Help for .NET developers). Is it what you are looking for?
Thanks,I figured it out. tagRECT is giving me current extent.
IActiveView activeView = ArcMap.Document.FocusMap as IActiveView;
IDisplayTransformation DT = activeView.ScreenDisplay.DisplayTransformation;
tagRECT deviceRECT = DT.get_DeviceFrame();