Piotrekk,
You should be able to call SendMessage through the P/Invoke layer,
passing the TBM_GETPTICS message. From there, you will have the locations
of all the tics, and you can then calculate your location with the x
position (the y position shouldn't matter, unless this was a vertical
trackbar, in which case the returned array of tics would be compared to the
y value).
You will, of course, have to use the Marshal class to marshal the array
into managed code to do your comparisons.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Piotrekk" <Pi*************@gmail.comwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
Hi.
I have a trackbar. I need to set trackbar value depending on where
user has clicked on the bar ( mouse_up event for example ). However
avent arguments are telling me only about x and y position and so
on... If i had hittest method i could try to work it out... Maybe you
will know how to do described task?
Regards
PK