Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a C# add-in and trying to implement a piece where a user can add points to a graphics layer on the map view. The points are drawing, however the map pane has serious ghosting issues and I lose the ability to scroll zoom in and out. I assume the problem is in the way I am refreshing the display. Any input would be great. Thanks,

protected override void OnMouseDown(MouseEventArgs arg)

        IGeometry pointcreate = drawPoint(ArcMap.Document.ActiveView, arg.X, arg.Y); //This creates the point but does not actually place it on screen
        IRgbColor newColor = new RgbColorClass();
        newColor.Red = 128;
        IMap thisMap = getMap(ArcMap.Application);
        addGraphicToMap(thisMap, pointcreate, newColor,newColor); //this actually places the graphic on screen.
        IPoint newPoint = ScrCoordToMapCoord(arg.X, arg.Y, ArcMap.Document.ActiveView);
        ArcMap.Document.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); //This is the refresh in question, I think.


share|improve this question
Are you calling IScreenDisplay.StartDrawing anywhere? – Kirk Kuykendall Jun 15 '12 at 18:15
It's being called inside of the drawPoint method. Upon my review of this, I noticed I had not called the IScreenDisplay.FinishDrawing(). I stuck that in and everything is working fine now. Thanks for the nudge in the right direction. – AHigh Jun 15 '12 at 18:22
up vote 2 down vote accepted

Anytime you call IScreenDisplay.StartDrawing, be sure you call IScreenDisplay.FinishDrawing, otherwise your display caches can become corrupted. To be safe, consider calling FinishDrawing in an exception handler.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.