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
|
Private Declare Function GetWindowLong _
Lib "user32" _
Alias "GetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong _
Lib "user32" _
Alias "SetWindowLongA" ( _
ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function GetSystemMenu _
Lib "user32" ( _
ByVal hwnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function DeleteMenu _
Lib "user32" ( _
ByVal hMenu As Long, _
ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Sub Griser()
Dim I As Long
With Application
'la croix
DeleteMenu GetSystemMenu(.hwnd, False), 6, 1024
'le mini
I = DeleteMenu(GetSystemMenu(.hwnd, False), -4064, 0)
I = GetWindowLong(.hwnd, -16)
I = I Xor 131072
SetWindowLong .hwnd, -16, I
'le maxi
I = DeleteMenu(GetSystemMenu(.hwnd, False), -4048, 0)
I = GetWindowLong(.hwnd, -16)
I = I Xor 65536
SetWindowLong .hwnd, -16, I
End With
End Sub |
Partager