DrawReversibleLine does not work with vista RRS feed

  • Question

  • There is a serious problem with windows forms in .Net 2.0 on Vista.

    Windows forms includes a feature for drawing "tracking cursors" or "rubber band lines" called DrawReversibleLine.

    Here is an example C# method which uses that.

    In windows XP, calling DrawReversibleLine twice on the same control, with the same co-ordiantes causes the line to vanish, so that the line can be moved, tracking the cursor.

    In Vista you get a "mess" of mouse trails, with all lines drawn on the image, and no lines ever being erased.

    This is a critical feature of our applications, and will prevent us from using Vista, until fixed.

    Does anyone know about the status of this issue, and any way to resolve it, which works on both XP and Vista?


    private void LineTo(Control c, int x, int y)
       m_lineEndPoint.X = x;
       m_lineEndPoint.Y = y;

       Point start = c.PointToScreen(m_lineStartPoint);
       Point end = c.PointToScreen(m_lineEndPoint);
       ControlPaint.DrawReversibleLine(start, end, SystemColors.Control);

       m_lineStartPoint = m_lineEndPoint;

    Wednesday, October 4, 2006 9:29 PM