473,699 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide Ttle Bar

DS
How do you hide the Title Bar for Access the application. I have
everything done but I need to hide the title bar. I've seen code to
hide Access but that seems like overkill. Can I put hiding the Title
Bar in the Load property of the first form that loads, What would the
syntax be.
Thanks
DS
Nov 13 '05 #1
13 14726
DS wrote:
How do you hide the Title Bar for Access the application. I have
everything done but I need to hide the title bar. I've seen code to
hide Access but that seems like overkill. Can I put hiding the Title
Bar in the Load property of the first form that loads, What would the
syntax be.
Thanks
DS


Get to the database window and click Tools/Startup. Enter something
into ApplicationTitl e. Exit Access. Enter App. Does that work?
Nov 13 '05 #2
DS
Salad wrote:
DS wrote:
How do you hide the Title Bar for Access the application. I have
everything done but I need to hide the title bar. I've seen code to
hide Access but that seems like overkill. Can I put hiding the Title
Bar in the Load property of the first form that loads, What would the
syntax be.
Thanks
DS

Get to the database window and click Tools/Startup. Enter something
into ApplicationTitl e. Exit Access. Enter App. Does that work?

Nope. Thanks for trying!
DS
Nov 13 '05 #3
On Fri, 21 Jan 2005 23:37:33 -0500, DS <bo******@opton line.net> wrote:
How do you hide the Title Bar for Access the application. I have
everything done but I need to hide the title bar. I've seen code to
hide Access but that seems like overkill. Can I put hiding the Title
Bar in the Load property of the first form that loads, What would the
syntax be.
Thanks
DS

Hi
I'm pretty sure you can't do this. Having or not having a title bar is
part of the class definition of a window which must be set when the
window is created, and I don't think it can be changed.

If you do hide the application window, make sure ALL errors are
caught.

David

Nov 13 '05 #4

You ned to use API calls to do this, You can try the following.

Paste the following code to a standard module.

' *************
' Code Start
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_FRAMECHANGE D = &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_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 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)

--
Terry Kreft
MVP Microsoft Access
"DS" <bo******@opton line.net> wrote in message
news:oR******** ********@fe08.l ga...
How do you hide the Title Bar for Access the application. I have
everything done but I need to hide the title bar. I've seen code to
hide Access but that seems like overkill. Can I put hiding the Title
Bar in the Load property of the first form that loads, What would the
syntax be.
Thanks
DS

Nov 13 '05 #5
Terry Kreft wrote:
You ned to use API calls to do this, You can try the following.

Paste the following code to a standard module.

' *************
' Code Start
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_FRAMECHANGE D = &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_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 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)


That's very slick, Terry. I'm not sure if I'd ever use it, but it's slick.

On my XP machine, I do have one glitch. On my Windows StartBar I have
the AutoHide the taskbar set to true. Thus I have to move my mouse down
where the start bar is then it "pops up" instead of being visible at all
times. (I can always access it using Alt-Tab but some people may be
uncomfortable with that method)

If I enter Access, and the Access startup property is StatusBarOn =
True, when I turn off the window border with this routine your wrote,
the Windows Start bar goes to sleep. If I move the mouse to it's general
area, the start bar does not pop up anymore. When I turn the Access
window bar back on, I can access the Window's Startup bar.

If I have StatusBarOn = False, I do not have this problem. I guess this
is due to having more desktop real estate within Access.

I guess this is more of a Windows problem than an Access problem. If
the poster uses your code, it's something he may need to be aware
of...but then again, it may just be my machine that operates this way.

Nov 13 '05 #6
Salad,
Thanks for this, I actually missed a flag on the SetWindowPos call.

Could you add in the declarations section

Private Const SWP_NOMOVE = &H2

and then change

wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

to
wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D + SWP_NOMOVE

and see if that makes a difference?

It works correctly in Win2000 pro anyway.

--
Terry Kreft
MVP Microsoft Access
"Salad" <oi*@vinegar.co m> wrote in message
news:m7******** *********@newsr ead1.news.pas.e arthlink.net...
Terry Kreft wrote:
You ned to use API calls to do this, You can try the following.

Paste the following code to a standard module.

' *************
' Code Start
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_FRAMECHANGE D = &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_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 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)
That's very slick, Terry. I'm not sure if I'd ever use it, but it's

slick.
On my XP machine, I do have one glitch. On my Windows StartBar I have
the AutoHide the taskbar set to true. Thus I have to move my mouse down
where the start bar is then it "pops up" instead of being visible at all
times. (I can always access it using Alt-Tab but some people may be
uncomfortable with that method)

If I enter Access, and the Access startup property is StatusBarOn =
True, when I turn off the window border with this routine your wrote,
the Windows Start bar goes to sleep. If I move the mouse to it's general
area, the start bar does not pop up anymore. When I turn the Access
window bar back on, I can access the Window's Startup bar.

If I have StatusBarOn = False, I do not have this problem. I guess this
is due to having more desktop real estate within Access.

I guess this is more of a Windows problem than an Access problem. If
the poster uses your code, it's something he may need to be aware
of...but then again, it may just be my machine that operates this way.

Nov 13 '05 #7
Terry Kreft wrote:
Salad,
Thanks for this, I actually missed a flag on the SetWindowPos call.

Could you add in the declarations section

Private Const SWP_NOMOVE = &H2

and then change

wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

to
wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D + SWP_NOMOVE

and see if that makes a difference?

It works correctly in Win2000 pro anyway.


Works like a champ!
Nov 13 '05 #8
DS
Terry Kreft wrote:
You ned to use API calls to do this, You can try the following.

Paste the following code to a standard module.

' *************
' Code Start
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_FRAMECHANGE D = &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_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 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)

Thanks Terry,
Any downside to this?
DS
Nov 13 '05 #9
On Mon, 24 Jan 2005 11:08:10 -0000, "Terry Kreft"
<te*********@mp s.co.uk> wrote:

You need to use API calls to do this, You can try the following.

<snip>

I stand corrected by the master!
David

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4507
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on. When the user...
3
2947
by: alex | last post by:
I'd like to have a show/hide widget on my web site, kind of like "show details" / "hide details" in Google Groups. Is there a tutorial explaining how to make them? Google's is a bit complex and it's easy to get something wrong. If the browser does not support the required features, I want it to generate a completely static page with the "details" shown automatically.
7
29136
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field below the comment with a spell check & submit button. Clicking "Amend" would display the same buttons & text field but pre-populated with the original comment. Using Java Script how do I show / hide the text field in my list of comments but have...
5
8435
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of form tags and div elements say n. The problem
1
4169
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. I don`t want to change the way i have used to show and hide layers. check down code :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
6
3960
by: Ralph | last post by:
Hi, I was reading effictive C++ and some other books again and they all tell you about hiding implementation details (proxy/pimpl/inheritance) but they never really explain when to use it. I am starting on a new project which is part library so I think it would be good to hide the implementation for the public classes in the library but this seems a lot of overhead to me (both when developing and runtime overhead).
0
10766
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
6
2528
by: theory | last post by:
Having an odd problem with this script- it's supposed to show/hid div's based on the option selected in a selection box. It's supposed to change methodology based on common browsers. The hardest part of my needs is that I explicitly need to support IE6, IE7, IE8, FF2, and FF3. Other browsers are optional, but that IE6 throws a monkeywrench in things. So I came up with this script, and now it supports FF2-3, but IE is catching an error,...
0
1964
by: atencorps | last post by:
Hello I have the following code but need some help on it. The idea of the code is the main sections ie Service Management are viewable when the page is loaded and by clicking on the main titles/headings or clicking on the 'expand all' will allow you to view the items underneath each title/heading. The page seems to be broken at the Incident and Request Management title/heading section as shown in the image attached. Can anyone help /...
0
9173
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6533
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.