1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Private Sub MDIForm_Resize()
If Me.Height - HBarretitre < 75 Then Exit Sub
If Me.WindowState = vbMinimized Or PictFond.Width < 1 Then Exit Sub
PictFond.Height = Me.Height - HBarretitre
LaPict.Render PictFond.hDC, 0, 0, PictFond.ScaleWidth - Bordures, PictFond.ScaleHeight - Bordures, _
0, LaPict.Height, LaPict.Width, -LaPict.Height, 0
PictFond.Refresh
Me.Picture = PictFond.Image
'-- Redessine, sa ne marche pas pourquoi ??
'SendMessage Me.hwnd, WM_SETREDRAW, True, vbNullString
'-- Redessine correctement au passage Normal ----> Maximized et inversement
SendMessage Me.hwnd, WM_MDIACTIVATE, True, vbNullString
End Sub |
Partager