Hide border of the MS access window?

Hudas

Registered User.
Local time
Today, 07:33
Joined
May 13, 2013
Messages
55
Hi -

Is there a way to hide the border of the MS access window? I just want to hide the border nothing more.

Thank you
Hudas​
 
UHM well let me take a stab. This is just a bit of quick referencing I picked up for you to start with. I'm going by memory here lol

Theres something called set/get windowlong.

With that you can capture the Access instances hwind and set the window's properties.

See here for Set Window Style
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).aspx

See here for Window Styles
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632600(v=vs.85).aspx

Code:
Private Declare Function SetClassLong Lib "user32.dll" Alias "SetClassLongA" ( _
    ByVal hwnd As Long, _
    ByVal nIndex As Long, _
    ByVal dwNewLong As Long _
) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" ( _
    ByVal hwnd As Long, _
    ByVal nIndex As Long, _
    ByVal dwNewLong As Long _
) As Long

Private Const GCL_STYLE As Long = -26&
Private Const GWL_STYLE As Long = -16&
Private Const GWL_EXSTYLE As Long = -20&

Private Sub Form_Load()
    SetClassLong hwnd, GCL_STYLE, 0&
    SetWindowLong hwnd, GWL_STYLE, 0&
    SetWindowLong hwnd, GWL_EXSTYLE, 0&
    Hide
    Show
    DoEvents
    End
End Sub
 
Hello -

I tried my best to make the above idea work but I wasn't good enough. Searching online brought me to a site that provided solution on hiding the Access Title Bar. I was hoping could this be modified to hide the access window border?
Code:
Option Compare Database
' *************
' Code Start
Option Explicit
Private Const GWL_STYLE = WS_EX_TRANSPARENT '(-16)
Private Const WS_CAPTION = &HC00000
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOZORDER = &H4
Public Const SWP_FRAMECHANGED = &H20
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 SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
' **************************************************
'
Function AccessTitleBar(Show As Boolean) As Long
Dim hwnd As Long
Dim nIndex As Long
Dim dwNewLong As Long
Dim dwLong As Long
Dim wFlags As Long
hwnd = hWndAccessApp
nIndex = GWL_STYLE
wFlags = SWP_HIDEWINDOW + SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGED
dwLong = GetWindowLong(hwnd, nIndex)
If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If
Call SetWindowLong(hwnd, nIndex, dwNewLong)
Call SetWindowPos(hwnd, 0&, 0&, 0&, 0&, 0&, wFlags)
End Function
' Code End
' *************
'Sample calls
'To turn off title bar
'Call AccessTitleBar(False)
'
'To turn on title bar
'Call AccessTitleBar(True)
 
If you're looking to get rid of the access look entirely and just see the form's you're working with, I found my old code.

Attached is an example form. HERE

This form demonstrates both the applications transparency, and a transparency key set to the form.
 

Attachments

Users who are viewing this thread

Back
Top Bottom