Results 1 to 3 of 3
  1. #1
    stu_C is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    38

    Hiding top title Bar

    Hi all


    I have access 2013 and I want to hide the top title bar is this possible? I have done a bit of searching and apparently you use a module (code below), but still not working, is it possible to get the module to run automatically when the database load if so how?

    Code:
    Option Explicit
     Private Const GWL_STYLE = (-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
     Private Const SWP_NOMOVE = &H2
     ' **************************************************
     '
     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_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGED + SWP_NOMOVE
     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

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Have you tested the code? Does it do what you want it to?

  3. #3
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 08-03-2016, 04:36 AM
  2. Replies: 2
    Last Post: 03-20-2015, 06:30 AM
  3. Auto Title
    By Lois in forum Forms
    Replies: 1
    Last Post: 10-21-2011, 09:21 AM
  4. No useful title
    By cap.zadi in forum Access
    Replies: 1
    Last Post: 09-05-2011, 09:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums