Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control's Position on Screen
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00827479
Message ID:
00827959
Views:
13
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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform