Problema con getwindowlong en access 2010 64 bits

Ante todo un gran saludo.
Efecto tipo messenger de Jefferson está genial. Corre perfecto en 32 bits pero no así en 64 bits.
Cuando ejecuto el código en VBA7 con 64 bits, la declaración: GetWindowLong(Me. Hwnd, GWL_EXSTYLE) Or WS_EX_LAYERED me dice: No coinciden los tipos y selecciona a Or. Hice todos los cambios como:
#If VBA7 Then
Public Declare PtrSafe Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As LongPtr, ByVal Color As Long, ByVal por As Byte, ByVal alpha As Long) As Boolean
Public Declare PtrSafe Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPtr
Public Declare PtrSafe Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As LongPtr, ByVal nIndex As LongPtr) As LongPtr
#Else
Public Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal Color As Long, ByVal por As Byte, ByVal alpha As Long) As Boolean
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
#End If
#If VBA7 Then
Dim lngHwnd As LongPtr
lngHwnd = Application.hWndAccessApp
SetWindowLongPtr lngHwnd, GWL_EXSTYLE, GetWindowLongPtr(lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes lngHwnd, 0, bytNivel, LWA_ALPHA
OcultarVentanaAccess = True
#Else
Dim lngHwnd As Long
lngHwnd = Application.hWndAccessApp
SetWindowLong lngHwnd, GWL_EXSTYLE, GetWindowLong(lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes lngHwnd, 0, bytNivel, LWA_ALPHA
OcultarVentanaAccess = True
#End If
¿Tienen alguna idea de cómo cambiarlo para que funcione bien?
Gracias de antemano
Saludos Cordiales
Rafael Barreto

Añade tu respuesta

Haz clic para o