Muy interesante.
Puede que te convenga usar probablemente la propiedad
Mode del Picturebox.
Cita:PictureBox.Normal The picture is displayed at it’s original size. No attempt is made to fit the picture to the size of the PictureBox.
PictureBox.Fill The picture is stretched to fit both the width and height of the PictureBox. Proportionality of the picture is not maintained.
PictureBox.Cover The picture proportionality is maintained. The entire PictureBox height and width is filled.
PictureBox.Contain The picture proportionality is maintained. The entire picture is displayed and stretched for best fit.
PictureBox.Repeat The picture is displayed at it’s original size and repeated. The entire PictureBox height and width is filled.
Asignale la constante que más te convenga a la propiedad Mode del Picturebox.
Ejemplo:
Cita:Código:
Public Sub foto_Change()
Dim proporcion As Float
Dim pic As Picture
Dim tmp As String
If Not foto.text Then Return
tmp = File.Dir(Temp())
File.Save(tmp &/ alias.Text & ".jpeg", UnBase64(foto.Text))
pic = Picture.Load(tmp &/ alias.Text & ".jpeg")
pbfoto.Mode = PictureBox.Contain
pbfoto.Picture = pic
'proporcion = pic.Width / pic.Height
'pbFoto.Picture = pic.Stretch(Round(proporcion * pbFoto.h), pbfoto.H)
Wait 0.01
End
Saludos