1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| #If WIN64 Then
#If VBA7 Then
Private Declare PtrSafe Function SetWindowLongPtrA Lib "USER32"(ByVal hWnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As Longlong) As LongPtr
Private Declare PtrSafe Function FindWindowA Lib "USER32" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
Private Declare PtrSafe Function GetWindowLongA Lib "user32" ( ByVal hwnd As LongPtr,ByVal nIndex As Longlong) As LongPtr
Private Declare PtrSafe Function ShowWindow Lib "user32" Alias "ShowWindow" ( ByVal hwnd As LongPtr, ByVal nCmdShow As Longlong) As Longlong
#Else
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
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 ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
#End If
#Else
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
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 ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
#End If |
Partager