Salut Sébastien, Wilfried, Pascal76, le Forum,
Je suis fier de moi, car pour une fois, je donne une réponse hi hi hi ...
Voici un extrait d'un auteur dont j'ai oublié le nom (et oui, vous n'alliez pas penser que c'était de moi quand même ???). Ce code permet d'avoir un USF en plein écran.
Private Declare Function FindWindowA Lib "User32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "User32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim hWnd As Long, exLong As Long, zFactor As Integer
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then SetWindowLongA hWnd, -16, exLong And &HFF77FFFF
zFactor = 100 * CInt(Application.Width / Me.Width)
Me.Width = Application.Width
Me.Height = Application.Height
End Sub
Cordialement,
JVD667
PS : Bonnes Fêtes de fin d'année, et vive 2005