Olá a todos! Pessoal eu uso o seguinte módulo para deixar a janela do access invisível, acontece que só dá certo em windows 32 bits, gostaria de saber como adaptar o código para quem usa 64 bits.O código é esse:
ption Compare Database
Option Explicit
'Autor de la función base: Indeterminado
'Declaraciones
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 GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
'Constantes
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_ALPHA = &H2
Function AccessTransparente(Nivel As Integer)
'Adaptación: Byron Contreras, febrero 08, byronlcl@gmail.com
'Objetivo: Ajustar el nivel de transparencia de la ventana principal
' de access. El nivel de transparencia debe estar entre 0 a 250
'.............................................................................
Dim lngHwnd As Long
If Nivel < 0 Or Nivel > 250 Then Exit Function
lngHwnd = Application.hWndAccessApp
SetWindowLong lngHwnd, GWL_EXSTYLE, GetWindowLong(lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes lngHwnd, 0, Nivel, LWA_ALPHA
End Function
'
'Ejemplo de uso:
'Private Sub Form_Load()
'Call AccessTransparente(175)
'End Sub
ption Compare Database
Option Explicit
'Autor de la función base: Indeterminado
'Declaraciones
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 GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
'Constantes
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_ALPHA = &H2
Function AccessTransparente(Nivel As Integer)
'Adaptación: Byron Contreras, febrero 08, byronlcl@gmail.com
'Objetivo: Ajustar el nivel de transparencia de la ventana principal
' de access. El nivel de transparencia debe estar entre 0 a 250
'.............................................................................
Dim lngHwnd As Long
If Nivel < 0 Or Nivel > 250 Then Exit Function
lngHwnd = Application.hWndAccessApp
SetWindowLong lngHwnd, GWL_EXSTYLE, GetWindowLong(lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes lngHwnd, 0, Nivel, LWA_ALPHA
End Function
'
'Ejemplo de uso:
'Private Sub Form_Load()
'Call AccessTransparente(175)
'End Sub