Hide database window - Transparency Method

Your system will look professional.

This is a very simple way to hide the database window, with this feature it is possible
vary the transparency of the window gradually, ranging from 0 to 255, the closer to zero, the greater the transparency.
'Copy and paste the code below into your main form.

Option Explicit
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

Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_LAYERED = & H80000
Private Const LWA_ALPHA = & H2

Function AccessTransparent (Level As Integer)
Dim lngHwnd As Long
If Level <0 Or Level> 255 Then Exit Function
lngHwnd = Application.hWndAccessApp
SetWindowLong lngHwnd, GWL_EXSTYLE, GetWindowLong (lngHwnd, GWL_EXSTYLE) Or WS_EX_LAYERED
SetLayeredWindowAttributes lngHwnd, 0, Level, LWA_ALPHA
End Function

Private Sub Form_Open (Cancel As Integer) 'Event when opening the form the level of transparency will be zero.
AccessTransparent (0)
End Sub

'Attention:
'Set the form to "popup = yes" on the Other tab of the form's properties window,
'this is necessary for the form to be displayed in front of the others.

'When you close the access by the "X" button, the access window will be open at the bottom of the windows,
'to solve this problem, see the example "Close System".