Ver Mensaje Individual
  #11 (permalink)  
Antiguo 28/05/2008, 01:32
Mirador
 
Fecha de Ingreso: abril-2007
Mensajes: 82
Antigüedad: 17 años, 1 mes
Puntos: 0
Respuesta: Resizar MDIform.picture (VB6)

Genial amigo David el Frande, solo he tenido que añadir una linea mas para que fuera perfecto, ya que la imagen se resizaba pero el picturebox no, pongo el codigo por si alguien puede ponerlo en el FAQ ya que es de mucha ayuda:

Código:
' By MaxExtreme (Tamaño de Imagen) -- (modificado por Mirador)
Private Const IMAGESIZE = 0.566893424036281
 
Private Sub MDIForm_Resize()
On Error Resume Next
Dim ImageWidth As Single
Dim ImageHeight As Single
picStretch.Visible = False
picStretch.AutoRedraw = True
picStretch.Height = Me.Height
ImageWidth = picStretch.Picture.Width * IMAGESIZE
ImageHeight = picStretch.Picture.Height * IMAGESIZE
picStretch.PaintPicture picStretch.Picture, 0, 0, Me.Width, Me.Height, 0, 0, ImageWidth, ImageHeight
Set Me.Picture = picStretch.Image
End Sub
Gracias a todos por vuestra ayuda