How can i determine the position in the screen
e.g. : we got a form (somewhere) with a panel and on that panel there's a groupbox. on that groupbox there is a button.
When you click on the button , a new form wil show right below the button
to show the new form i need the coordinates of the button on the screen
I could dril up in the hirachie until there is no parent anymore and sum al the top and left values
But i suspect there is a elegant methode to do this
Regards Remco

Position
kojot
Tns a lot That worked
Remco
Brendan Comerford
Form1
nForm = new Form1();nForm.StartPosition =
FormStartPosition.Manual;nForm.Left = button2.Right +
this.Left;nForm.Top = button2.Bottom +
this.Top + 15;nForm.ShowDialog();
Edmund Leung
Remco
fleshi
Dim point As New Point(Button1.Width, 0)
point = Button1.PointToScreen(point)
Form2.Show()
Form2.Location = point
Robin Speed
If not you should use the ClientToScreen function of user32 API. The syntax is the following and the function does exaclty what you want. Converts coordinates of a control from the window coordinate system to the screen coordinate system:
Declare Function ClientToScreen Lib "user32" Alias "ClientToScreen" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long