Bonjour anasecu
et si l'application n'est pas maximisée hein!!???? tu y a pensé???
si utilisation l'exemple de la faq il faut completer sinon il y a d'autre solution (api,registre)
1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub UserForm_Initialize()
Dim etat As Long
etat = Application.WindowState
Application.WindowState = xlMaximized
With Me
.startupposition = 3
.Width = Application.Width
.Height = Application.Height
.Left = 0
.Top = 0
End With
Application.WindowState = etat
End Sub |
et contrairement a l'exemple de la faq il faut utiliser le initialyse et non le activate de l'userform
et sur Windows 7 ca demande encore quelque ajustement
sans les api ca donne ca
debloquer l'apostrophe devant les "+" ou "-"
1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub UserForm_Initialize()
Dim etat As Long
etat = Application.WindowState
Application.WindowState = xlMaximized
With Me
.startupposition = 3
.Width = Application.Width '- (Me.Height - Me.InsideHeight)' recalage avec W 7
.Height = Application.Height '- (Me.Height - Me.InsideHeight) + 6'recalage avec W 7
.Left = 0 '+3 '3 est l'epaisseur thick-borderwindows dans W7
.Top = 0
End With
Application.WindowState = etat
End Sub |
Partager