Guest cgchris99 Posted October 17, 2002 Posted October 17, 2002 I am trying to get the location of a textbox when someone clicks on it. So I assumed it would be textboxname.top or textboxname.location.y However, this is relative position to the control it resides in. So if it is in a tab. The Y location is much smaller than it is in relationship to the overall form. I need to know absolute Top in relationship to the form itself. Thanks for any help Quote
*Gurus* divil Posted October 17, 2002 *Gurus* Posted October 17, 2002 Use the PointToClient() and PointToScreen() methods of the form, and the textbox, respectively. Or just add the coordinates to the those of the tab it's on, and any other container controls. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.