473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hittest for segmented lines

Hello,
I'm drawing a segmented lines to a graphics object. I want to test for
each mouseclick event it should check whether the cursor is on the line. If
so it should select the entire line.

I'm createing a GraphicsPath object. Then adding each segments of the line
to this path. Then checking path.IsVisible agains the cursor point. But this
is not working.
Please help me to d this.

Thanks and Regards,
--
Gana
Nov 16 '05 #1
1 2514
The GDI+ FAQ has an article on this.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"gana" <ga**@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
Hello,
I'm drawing a segmented lines to a graphics object. I want to test for
each mouseclick event it should check whether the cursor is on the line. If so it should select the entire line.

I'm createing a GraphicsPath object. Then adding each segments of the line
to this path. Then checking path.IsVisible agains the cursor point. But this is not working.
Please help me to d this.

Thanks and Regards,
--
Gana

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Smutny30 | last post by:
Hello, I consider partitioning a huge table. I am not sure wheather it is possioble only in partitioned databases. I found somewhere in docs ( http://tinyurl.com/4oara ) that there are (simple,...
0
by: luckybird | last post by:
I succeeded in obtaining a CListCtrl item info using HitTest() when the List Ctrl is owned by my current thread. But when I tried HitTest an item of a List Ctrl owned by other threads such as...
1
by: H.B. | last post by:
Hi, I get LVHITTESTINFO::Flag=LVHT_NOWHERE when I do a Hit Test in my ListView. The list containts items and subitems created with designer. Clicking anywhere in the list makes not HitTest...
6
by: Ryan | last post by:
Hi, I am confused with how NetworkStream works. My application needs to handle heavy requests sent through TCP socket connection. I use NetworkStream.Read method to get the stream...
3
by: Maria Anthonsen | last post by:
I'm using HitTest to get a value from the cells into a textbox. I have put the HitTest code into the MouseDown-event, and everything is working except one thing. When I start the program the value...
2
by: Martin | last post by:
Hi all, I'm trying to correct the (imho) wrong behaviour of a listbox when the user right-clicks on an item. I would like the selection to change when this happens, just like when the user uses...
0
by: ohadasor | last post by:
Hi All, I have a listview, which has a vertical scrollbar so not all items are visible at the same time. I have the coordinate of a point for which I need to know which one of the ListViewItems...
1
by: goldpython | last post by:
I'm working in C#, .NET framework 2.0. I'm writing a text editor and wanted a finer degree of control over the window that a normal edit box will allow, and so decided to build the display...
2
by: =?Utf-8?B?UGFycm90?= | last post by:
I am trying to implement a drag and drop operation from a listbox to a data gridview control but I keep getting -1 for my row index when the dragdrop function is executed. Below is my coding. ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.