how to draw crosshairs on a chart that go to the height and width of the chart and move with the cur

S

Steve

I am at a loss with graphics to know how to draw crosshairs on a chart that
go to the height and width of the chart and move with the cursor position?

Ideally i would like to have the behavour the same as the smaller crosshairs
of the standard cursor but enlarged to the edges of the chart.

I have a Delphi background and am new to VS C# - prevously i used (Delphi
code) ChartImage.canvas.pen.mode:=pmnot; which allowed me to draw lines and
then clear them before
moving on to the next position (in the onmousemove event).

I thought i would be able to do this in C# as well but have not found a way.

Any ideas or suggestions most welcome - email is (e-mail address removed)

rgds,Steve
 
S

Stoitcho Goutsev \(100\)

Steve,

Raster operation don't work anymore with .NET and GDI+. You need to draw the
lines and then repaint the control underneath.
However there is a class System.Windows.Forms.ControlPaint that provides a
method called DrawReversibleLine that can be used, but it is pretty simple
and uses screen coordinates (draws on the screen DC rather then on
particular control)

Chack out this KB

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314945
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top