Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control's Position on Screen
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00827479
Message ID:
00827959
Vues:
14
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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform