Get absolute position of a control on a form
Posted on 2004-09-09
Seems like an easy question but I've been banging my head all day long..
I have one form which has some controls on it. I can easily get e.g. a textBoxes Location from textBox.Left.
But now I have a datagrid with a few DataGridTextBoxes in it and I need the position of that DataGridTextBox on the Form. I only need to get it, I do not need to manipulate it.
If I call - say .. dataGridTextBox.Left it will give me 0, although that is not correct ...
Is there any method to get the abolsute position of a control on a Form (and not only within it's container)