PC Review


Reply
Thread Tools Rate Thread

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

 
 
Steve
Guest
Posts: n/a
 
      11th Sep 2006
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 Removed)

rgds,Steve


 
Reply With Quote
 
 
 
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      11th Sep 2006
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...;en-us;Q314945


--
HTH
Stoitcho Goutsev (100)

"Steve" <(E-Mail Removed)> wrote in message
news:ypdNg.27319$(E-Mail Removed)...
>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 Removed)
>
> rgds,Steve
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can you make crosshairs on a chart in excel? RobGrn Microsoft Excel Charting 2 14th Jun 2008 10:49 AM
Edit the height or width of data series on a bar chart =?Utf-8?B?QnJ5YW4=?= Microsoft Access Reports 0 14th Sep 2007 04:38 PM
How to draw a line on a chart, and have it move with the chart? =?Utf-8?B?bWFueG1hbg==?= Microsoft Excel Charting 5 27th Sep 2006 09:31 PM
Resizing Chart Width and Height Kelly Microsoft Excel Charting 5 24th Mar 2004 09:57 PM
Bar chart with height and width Andy Microsoft Excel Charting 1 6th Jan 2004 04:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.