1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
Option Explicit
#If Win64 Then
#If VBA7 Then
Public Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare PtrSafe Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#ElseIf VBA6 Then
Public Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#End If
#Else
Public Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
#End If
'
Sub restaurer_croix_sys()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
SetWindowLongA hWnd, -16, &H94CF0080
End Sub
'
'
Sub supprimer_croix_sys() ' on enleve juste la croix
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
SetWindowLongA hWnd, -16, &H94C70080
End Sub
'
'
'
Sub no_caption()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Application.Caption)
SetWindowLongA hWnd, -16, &H94080080
End Sub
'
'
'
Sub affichage_normal()
restaurer_croix_sys
With Application
.ScreenUpdating = False
.DisplayFullScreen = False
.DisplayFormulaBar = True
.WindowState = xlMaximized
.OnKey "{esc}"
End With
With ActiveWindow
.DisplayHeadings = True
.DisplayGridlines = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
CommandBars.FindControl(ID:=2951).Enabled = True
End Sub
'
'
'
Sub affichage_plein_ecran()
Application.ScreenUpdating = False
no_caption ' enleve tout et plein ecran
With Application
.DisplayFullScreen = True
.ScreenUpdating = True
.OnKey "{esc}", "roule"
.DisplayFormulaBar = False
End With
With ActiveWindow
.DisplayHeadings = False
' .DisplayGridlines = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
CommandBars.FindControl(ID:=2951).Enabled = True ' on bloque l'item du menu cell"fermer le plein ecran
End Sub
'
Sub roule()
Dim toto
toto = "la tete a toto"
End Sub |
Partager