Finding the "Global" Location of a Control

  • Thread starter Thread starter Brian Takita
  • Start date Start date
B

Brian Takita

Hello,

I'm trying to find the Location of a control in Screen coordinates.

I'm trying to create a Popup Box below the control. However, the popup
box has a different parent control.

I tried adding up all of the Parent.Top and Parent.Left coordinates, but
the Popup was off from where I want it (and should?) to be.

Thank you,
Brian Takita
 
Hello,

Brian Takita said:
I'm trying to find the Location of a control in Screen coordinates.

I'm trying to create a Popup Box below the control. However, the popup
box has a different parent control.

I tried adding up all of the Parent.Top and Parent.Left coordinates, but
the Popup was off from where I want it (and should?) to be.

Have a look at the control's PointToClient and PointToScreen methods.

HTH,
Herfried K. Wagner
 
Back
Top