Link to home
Start Free TrialLog in
Avatar of curtn
curtn

asked on

Remove Access Menu Bar and Title Bar

How do you remove the Main Menu Bar from the main Access97 Parent Window.  Also is there a way to to eliminate the Main Access Title Bar or remove the Minimize, Maximize & Close buttons on the Main Parent Access97 Title Bar.
ASKER CERTIFIED SOLUTION
Avatar of mb1ake
mb1ake

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of spruce22
spruce22

I think mb1ake has the answer you're looking for, I just wanted to elaborate.  If you don't want to hide all of access, you can create your own menu bar, assign that menu bar to your form, and make your form the startup form of the database.  But I don't think you can get rid of the Min/Max buttons on the menu bar.  If you do hide all of Access (using the fAccessWindow function in the above post), make sure you have the forms pop up property set to true.  Otherwise the form will be hidden when you hide access.  Also make sure you call application.Quit in the close event of the form. You'll want to make this the startup form of your database.  In case you don't know how, click tools, startup, and select the form name from the Display Form dropdown.  Note that the startup form can be bypassed by holding shift down when you start access, but you can disable that ability by selecting Use Access Special Keys(in acc2000, forget exactly what it's called in 97 but it's in the advanced portion of startup properties).  What a bunch of rambling!

spruce22
curtn:  Welcome to EE.

You don't have to go through all that code writing and making API calls to do what I think you want to do.  You just want to keep a user under program control.

Spruce22 mentioned the Startup option under the Tools menu.  You have almost all the control that you want regarding how an application will appear from there.  You can provide your own Title, Icon, Custom Menu Bar, Custom Shortcut Menu Bar, and even the Display (startup form).  I prefer not to have a display form and use an AutoExec macro to call a procedure that checks to be sure everything is OK and load the forms.

The most important thing in the Startup option is the ability to customize what portion of Access you leave available to the user (or none).  The options are:

Allow Full Menus
Allow Default Shortcut Menus
Allow Viewing Code After Errors
Allow Built-in Toolbars
Allow Toolbar/Menu Changes
Display Database Window
Display Status Bar
Use Access Special Keys

We only check on Display Status Bar.  Everything else is off.

Regarding turning off the shift key so that the application starts without interuption - turning off Use Access Special Keys is not the answer.  There is code to make this change from a setup DB.  If you feel that you need it, I can give you a copy.

There was quite a bit of discussion about how to turn off the Min, Max, and Close buttons last Fall.  I will have to go back into my archives to find the answer, if you really feel that you want to do it.  I see no reason to do this.  I don't care if the app is minimized or not (I set the opening as Exclusive so the user cannot open two copies at the same time.) and I trap the Close button so that I can do a proper shutdown.

There are a few other customization tricks you can do by clicking the Options item under the Tools menu.  Exclusive is one of those options.

If you elaborate more on exactly what you want to do and why, I can provide you with more details.  BTW, I write commercial Access applications and user interface and security are my hot buttons.

Jim
One simple line of code to put in your startup screen.. be sure to have a database with a button that does the opposite because there's always the possibility of a user pushing reset before you have turned the window back on.

CommandBars.Item(32).Enabled = False

deletes the MenuBar, closing the last form available also closes MS Access

Be sure to set it back to enabled when you close the main form!!!

Another way to hide the access-window is much simpler. Just use a form that has it's properties set as follows:

borderstyle         = None
Min Max Buttons = None
Closebutton        = No
Autoresize          = Yes
Autocenter          = Yes

then make sure the form is big enough to cover the entire screen

This is a safer way, the close button of the pop-up form can be linked to closing Access  

(using Commandbars.Menubar. Item(#) I think....)

GOLLEM,

It is customary in the Access Topic area to post answers as 'Comments,' instead of proposing them as 'Answers.'  This prevents the question from being locked, encouraging more robust exchanges, and avoids making the person who asked the question reject one answer so that they can accept a different one.  

Would you please convert your 'Answer' to a 'Comment?'

Brian
curtn:  I found a couple of previous questions which might give you more information about removing the title bar et all.  I could have repeated the information here but there is a discussion involved which you might want to read, since we really aren't sure why you want to do this.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=10232791  will cost you 5 points to read.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=10245367  is free since the poster deleted the question after the comments were posted.

Of course, I'm still waiting for more information before I write a substantial bit of information that you might not need.

Jim
Avatar of curtn

ASKER

The answer provided simply said "Text below", with no other explanation.  His answer should have been a comment it seems.  Was he trying to poach points from somebody with the correct answer?
Avatar of curtn

ASKER

Awesome!  I have been looking for this type of solution for a ongoing problem.  I tried it, and it worked flawlessly.  Thanks alot!  
You have to click on the "Text below" to actually see the answer.  For PAQ's the thread is blocked until you pay the few points (10% of the original points for the question) to see the thread and the answer.  I still recommend going back to the first URL reference and reading the thread.  It is very informative about the whole process.

Jim