Thonord
Member
- Joined
- Oct 25, 2012
- Messages
- 23
- Programming Experience
- 10+
How to get X&Y coord when using MouseHover and set MouseHover-time and -size sysparas
I have information related to locations in bitmaps. I extract the info and process as needed by using the MouseClick event's e. (X&Y). Works OK, but I have discovered the MouseHover event and it seems promising.
However, its e.MouseEventArgs does not include X and Y. I have found a workaround, using MouseMove and storing the e.(X&Y)'s in global variables and reading the variables in MouseHover, I'm sure there is a properer way to do it.
Also, I find the default SystemParameters for MouseHover -Time and -Size "limiting" to my purposes.
Problem is, they are ReadOnly.
I have found* how to change other ReadOnly stuff like AutoscrollPosition by declaring a New one (pnlMainImage.AutoScrollPosition = New Point(Math.Abs(CurrentPoint.X), Math.Abs(CurrentPoint.Y))) , but Micrcrosoft wants to know why - when I try that approach on the SystemParameters and .Net crashes.
(It brings back memories of using the Dos tool Debug.exe Write and not paying attention to the drive number. That was a place where an: "Are you really, really, REALLY sure yoe want to do this? would have been appropriate:embarrassed:" )
But I digress.
* Found on this forum
1. What is the smart way to read the mouse position with MouseHover?
2. How do I change the SystemParameters for MouseHoverSize and MouseHoverSize.
As always
Tom
Which is actually a pun in norwegian
I have information related to locations in bitmaps. I extract the info and process as needed by using the MouseClick event's e. (X&Y). Works OK, but I have discovered the MouseHover event and it seems promising.
However, its e.MouseEventArgs does not include X and Y. I have found a workaround, using MouseMove and storing the e.(X&Y)'s in global variables and reading the variables in MouseHover, I'm sure there is a properer way to do it.
Also, I find the default SystemParameters for MouseHover -Time and -Size "limiting" to my purposes.
Problem is, they are ReadOnly.
I have found* how to change other ReadOnly stuff like AutoscrollPosition by declaring a New one (pnlMainImage.AutoScrollPosition = New Point(Math.Abs(CurrentPoint.X), Math.Abs(CurrentPoint.Y))) , but Micrcrosoft wants to know why - when I try that approach on the SystemParameters and .Net crashes.
(It brings back memories of using the Dos tool Debug.exe Write and not paying attention to the drive number. That was a place where an: "Are you really, really, REALLY sure yoe want to do this? would have been appropriate:embarrassed:" )
But I digress.
* Found on this forum
1. What is the smart way to read the mouse position with MouseHover?
2. How do I change the SystemParameters for MouseHoverSize and MouseHoverSize.
As always
Tom
Which is actually a pun in norwegian