Yes it works:), I tried it and it does draw. Put the code in the event OmMouseDown and it will draw rubberband segments on each mouseDown
I wrote this one and it also works in the same OnMouseDown. Just uncomment DrawPolyline or DrawPolygon and change something to get what you need.
public void DrawSomethingElse(IPoint pPoint)
{[INDENT] try
{[INDENT] IPoint a = new PointClass();
IPoint b = new PointClass();
a.PutCoords(pPoint.X + 100, pPoint.Y + 100);
b.PutCoords(pPoint.X - 100, pPoint.Y + 100);
IScreenDisplay screenDisplay = Extension.ActiveView.ScreenDisplay; // Constant
screenDisplay.StartDrawing(screenDisplay.hDC,
(System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache); // Explicit Cast
IRgbColor rgbColor = new ESRI.ArcGIS.Display.RgbColorClass();
rgbColor.Red = 255;
IColor color = rgbColor;
ISimpleLineSymbol simpleLineSymbol = new SimpleLineSymbolClass();
simpleLineSymbol.Color = color;
simpleLineSymbol.Width = 3;
ISimpleMarkerSymbol simpleMarkerSymbol = new SimpleMarkerSymbolClass();
simpleMarkerSymbol.Color = color;
ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();
simpleFillSymbol.Color = color;
ICircularArc circularArcThreePoint = new CircularArcClass();
IConstructCircularArc construtionCircularArc = circularArcThreePoint as IConstructCircularArc;
construtionCircularArc.ConstructThreePoints(a, pPoint, b, true);
object missing = Type.Missing;
ISymbol symbol = (ESRI.ArcGIS.Display.ISymbol)simpleMarkerSymbol;
// point
screenDisplay.SetSymbol(symbol);
screenDisplay.DrawPoint(a);
screenDisplay.DrawPoint(b);
screenDisplay.DrawPoint(pPoint);
// polygon
ISegment pSegment = circularArcThreePoint as ISegment;
ISegmentCollection pSegColl = new PolygonClass();
pSegColl.AddSegment(pSegment, ref missing, ref missing);
IGeometry pGeometry = pSegColl as IGeometry;
symbol = (ESRI.ArcGIS.Display.ISymbol)simpleFillSymbol;
screenDisplay.SetSymbol(symbol);
//screenDisplay.DrawPolygon(pGeometry);
// poyline
ISegment pLineSegment = circularArcThreePoint as ISegment;
ISegmentCollection pLineSegColl = new PolylineClass();
pLineSegColl.AddSegment(pLineSegment, ref missing, ref missing);
IGeometry pPolylineGeometry = pLineSegColl as IGeometry;
symbol = (ESRI.ArcGIS.Display.ISymbol)simpleLineSymbol;
screenDisplay.SetSymbol(symbol);
//screenDisplay.DrawPolyline(pPolylineGeometry);
screenDisplay.FinishDrawing();
[/INDENT]}
catch (Exception ex)
{[INDENT] MessageBox.Show(ex.Message);
[/INDENT]}
[/INDENT]}
Hope this will be helpful
regards Dubravko Antoni�?