Re : Demande d'aide pour "aditionner" deux codes
Re,
C'est bon cela fonctionne, si je peux je rajoute une couche avec un autre code que j'aimerais retrouver sur cette feuille:
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub pleinecran_ClicK()
Dim hdle As Long
Dim cmdB As CommandBar
If Application.DisplayFullScreen = True Then
hdle = FindWindowA("Shell_traywnd", "")
SetWindowPos hdle, 0, 0, 0, 0, 0, &H40
Application.DisplayFullScreen = False
For Each cmdB In Application.CommandBars
cmdB.Enabled = True
Next cmdB
pleinecran.Caption = "Plein écran"
ActiveCell.Select
Else: hdle = FindWindowA("Shell_traywnd", "")
SetWindowPos hdle, 0, 0, 0, 0, 0, &H80
Application.DisplayFullScreen = True
For Each cmdB In Application.CommandBars
cmdB.Enabled = False
Next cmdB
pleinecran.Caption = "Ecran normal"
ActiveCell.Select
End If
End Sub
lanoe