473,320 Members | 1,955 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,320 software developers and data experts.

get position *and time* of mouse path

Hi. I am trying to save position and time data on users mouse
movements as they move between 2 targets. Saving the x-y position
data is not difficult using the AddLine method of a GraphicsPath
object. What I would love to do is make a new class inherited from
GraphicsPath and add time data to the AddLine method, but the
GraphicsPath class is sealed.

I am collecting this data for mouse clicks (MouseDown) using an
ArrayList holding a custom object consisting of Point and TimeSpan
variables. I could probably do the same thing for MouseMove with
GraphicsPath and TimeSpan, but am curious if anyone has any other
ideas.

Thanks,
Justin

(Oh, I'm using c#, but figured someone using vb might have done it.)
Nov 20 '05 #1
4 1692
Justin,

You are pretty much going to have to do the same thing, storing the
TimeSpan information elsewhere outside of the GraphicsPath class.
Personally, I would have an ArrayList of your structures, with Point
information, and a time marker, not the timespan. The timespan can always
be computed. However, you can't move back from the timespan without storing
extra information.

Then, as you add your points, add the timespan as well. Basically, what
you mentioned before.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Justin Carter" <VB******@hotmail.com> wrote in message
news:c2**************************@posting.google.c om...
Hi. I am trying to save position and time data on users mouse
movements as they move between 2 targets. Saving the x-y position
data is not difficult using the AddLine method of a GraphicsPath
object. What I would love to do is make a new class inherited from
GraphicsPath and add time data to the AddLine method, but the
GraphicsPath class is sealed.

I am collecting this data for mouse clicks (MouseDown) using an
ArrayList holding a custom object consisting of Point and TimeSpan
variables. I could probably do the same thing for MouseMove with
GraphicsPath and TimeSpan, but am curious if anyone has any other
ideas.

Thanks,
Justin

(Oh, I'm using c#, but figured someone using vb might have done it.)

Nov 20 '05 #2
Hi Justin,

Do you actually use the GraphicsPath <as> a GraphicsPath later on or is it
just a handy place to put your co-ordinates?

If it's just for the storage then I'd certainly use the method that
Nicholas suggests. A GraphicsPath is a complex object which utilises Win
resources via the WinApi - overkill if you don't need that power.

Regards,
Fergus
Nov 20 '05 #3
* VB******@hotmail.com (Justin Carter) scripsit:
movements as they move between 2 targets. Saving the x-y position
data is not difficult using the AddLine method of a GraphicsPath
object. What I would love to do is make a new class inherited from
GraphicsPath and add time data to the AddLine method, but the
GraphicsPath class is sealed.

I am collecting this data for mouse clicks (MouseDown) using an
ArrayList holding a custom object consisting of Point and TimeSpan
variables. I could probably do the same thing for MouseMove with
GraphicsPath and TimeSpan, but am curious if anyone has any other
ideas.


I think that's the best way. Store the "abstract" data in an arraylist
and convert it to a 'GraphicsPath'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Thanks Nicholas, Fergus, and Herfried.

I implemented your suggestions, and things work fine. I might
eventually need the GraphicsPath, but for now, just the coordinates
and time will do fine. Thanks again,

Justin
Nov 20 '05 #5

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

Similar topics

2
by: Smiley | last post by:
I want one end of a line to follow the mouse?
8
by: Jaime Rios | last post by:
Hi, I created a COM AddIn for Word that performs the functions that it needs to, but I needed to add the ability for the toolbar created by the COM AddIn to remember it's last position and...
4
by: Jay | last post by:
Hi, How can I capture mouse position on Image? I found number of script capturing mouse position of the page. But I could not find anything based on image. What I want to find out is X Y...
3
by: David Hayes | last post by:
I've made tooltips work in Firefox*, but tooltip doesn't appear at the specified location until the SECOND time that the user passes the mouse over the location with the mouseover event. What I...
9
by: Samantha | last post by:
Looking at the goto(xy) thread. Is there a way to get the X,Y position from a cursor click and then use the position to apply something like a water mark on an image at that position? Thanks,
3
by: Justin Carter | last post by:
Hi. I am trying to save position and time data on users mouse movements as they move between 2 targets. Saving the x-y position data is not difficult using the AddLine method of a GraphicsPath...
1
by: Paul | last post by:
Hi all, I am making a DirectInput application wich must report correctly the cursor position in windowed mode (it means it has to be the same as Microsoft Window´s cursor position). First of...
2
by: mmdst23 | last post by:
I'm working on a video player app, and I want to implement a trackbar that behaves like the one in Media Player, that is the cursor position moves to where the user clicked instead of moving in...
19
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.