Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

debliu

[Resolvido] Picture box e cordenadas

Recommended Posts

jpaulino

Podes detectar assim:

    Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick
        Debug.WriteLine(String.Format("X={0}, Y={1}", e.X, e.Y))
    End Sub

Share this post


Link to post
Share on other sites
debliu

Esqueçam lá...

ja descobri...

  Private Sub PictureBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
        
        If MousePosition.Y >= 222 And MousePosition.Y <= 564 Then

            If MousePosition.X >= 34 And MousePosition.X <= 47 Then
                MsgBox("ponto")
            End If
        End If

thanks  :confused:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.