RE:Ayuda Urgente.....Problemas con MDIFORM
José.
Se me ocurrió esta solución, se trata de colocar un picturebox invisible llamado picCanvas 8poné borderstyle=0 y autoredraw=true), lo hacemos del mismo tamaño que el formulario en el evento resize,lo pintamos y guardamos el bitmap en un archivo temporal, luego insertamos la imagen en el form. El código es un poco lento, pero funciona. El código es el siguiente:
Option Explicit
DefLng A-Z
Private Sub MDIForm_Load()
With picCanvas
.BorderStyle=0
.Autoredraw=True
.BackColor=Me.BackColor
end with
MDIForm_Resize
End Sub
Private Sub MDIForm_Resize()
On Error Resume Next
Dim pic As Picture, w As Single, h As Single
Set pic = LoadPicture("C:\47.jpg")
With picCanvas
Me.picCanvas.Height = ScaleHeight
w = .ScaleX(pic.Width, vbHimetric, vbTwips)
h = .ScaleX(pic.Height, vbHimetric, vbTwips)
.Cls
.BackColor = Me.BackColor
.PaintPicture pic, (.ScaleWidth - w) / 2, (.ScaleHeight - h) / 2
.Refresh
SavePicture .Image, "C:\temp.bmp"
End With
Set pic = Nothing
Set Me.Picture = LoadPicture("C:\temp.bmp")
End Sub
Saludos Ruri