Jump to content

Como fazer zoom numa picturebox


a3deluxe

Recommended Posts

Boas,

- tens o form1 com uma picturebox pequena com uma imagem associada

- tens o form2 com uma picturebox grande

- em ambas as picturebox, coloca a propriedade "SizeMode" como "Zoom"

No form1, adicionas o evento do clique no picturebox

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
' Criar o form para ver a imagem em ponto grande
Dim form2 As Form2 = New Form2()
' Associar a imagem do form atual à picturebox do form2
form2.PictureBox1.Image = PictureBox1.Image
' Mostrar o form2 em dialog
form2.ShowDialog()
End Sub

(podes fazer duplo clique sobre a picturebox do form 1 para criar logo o evento)

Link to comment
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
×
×
  • Create New...

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.