tags:

views:

33

answers:

1

I have one toolstrip and I want to get its location related to desktop, what should I do ? I have tried Location.Y for its Y, but it gives 0 (zero) and that is related to form but I want y location related to its desktop.

+2  A: 

Check Control.PointToClient and Control.PointToScreen.

Benjamin Podszun
Thank You..Can I get the desktop location for the child control like toolstripbutton which is placed in the toolstrip ?
Harikrishna
And if I use this function PointToScreen it gives proper value if the toolstrip is top on the form, but if there is menustrip on the top of the form and then under the menustrip toolstrip is there then the function does not give proper value.
Harikrishna