Option Explicit Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Static fHeight As Single Static fWidth As Single Static fLeft As Single Static fTop As Single Static fStyle As Long If (KeyCode = vbKeyReturn) And (Shift And vbAltMask) Then If fStyle Then SetWindowLong hwnd, -16&, fStyle WindowState = vbNormal Height = fHeight Width = fWidth Left = fLeft Top = fTop fStyle = 0 Else fTop = Top fLeft = Left fWidth = Width fHeight = Height fStyle = SetWindowLong(hwnd, -16&, &H16000000) WindowState = vbMaximized End If End If End Sub
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.