Hi Arnaldo,
If FormB is inside the MDI parent form, you need to convert the location back to the client position via parent form's PointToClient Method method.
>Thanks for your Reply!
>
>It seems I'm not understanding the way that method works, here is my portion of code.
>
>The situation is:
>I have two forms: frmA, frmB
>In frmA I have a button (btnA)
>In the Button Click I want to show the frmB form in the same location of the button.
>
>
>
> Private Sub btnA_Click(ByVal sender As System.Object _
> , ByVal e As System.EventArgs) Handles btnA.Click
>
> Dim fA As New frmB()
> Dim pA As System.Drawing.Point
>
> pA = btnA.PointToScreen(btnA.Location)
>
> With fA
> .Show()
> .Left = pA.X
> .Top = pA.Y
> End With
>
> End Sub
>
>
>
>when I click the button the form shows in another position.
>
>Note: the frmA is MdiChild of another form MdiFrmA.
>
>Am I using the PointToScreen method incorrectly?
>
>Thanks again, in advance!
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi