I'm using RectangleToScreen to try to find the exact screen coordinates of a control in a form.
This piece of code above sometimes works. I've seen this sometimes return the screen location of the parent form not the location of the control residing in it. ???Code:Rectangle rectQD = m_qd.Control.FindForm().RectangleToScreen(m_qd.Control.Bounds);
This piece of code above always returns the correct screen location of the control. But it doesn't make any sense to me. Can someone explain?Code:Rectangle rectQD = m_qd.Control.RectangleToScreen(m_qd.Control.FindForm().ClientRectangle);
Thank you,




Reply With Quote