Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 05-04-2017, 04:50 PM   #1
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,614
Thanks: 90
Thanked 1,620 Times in 1,509 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Show/hide application window, navigation pane, ribbon, taskbar

I have created an example database to show how the Access application interface can be controlled in various ways.
Some of these methods can be used to make a database more secure.

It is intended to demonstrate that all of this is easy to do safely and without any issues arising

This item links to various posts in the thread:
https://www.access-programmers.co.uk...d.php?t=284248

The database is opened with form frmStart 'floating independently' on the desktop i.e. with the access application window hidden



Buttons on the form can be used to:
- show / hide entire Access application window
- show / hide navigation pane
- show / hide ribbon
- show / hide taskbar
- maximise the form to fill the entire screen (no title bar & no taskbar) - this only works for a popup form
- open another form with a related report. This shows how the print preview ribbon can be displayed whilst the report is open & hidden when it is closed
- open / close the VBE

Although it is highly unlikely that any single application would need to use all of these features, this is designed to show that all items can be toggled on / off independently without problems.

All code has been fully tested in Access 2010 & 2016.
In addition, each section of the code has been widely used in various production databases for several years.

The code used can be found in the modules:
- modDatabaseWindow / modNavPaneTaskbar / modRibbon

Some of the code is widely known e.g. hide navigation pane / ribbon.
Other parts are written by myself or other authors.
Where this is the case, those authors have been acknowledged.

This example database also includes:
- code to resize forms for any screen size & resolution (modResize module)
- additional functions in module modDesignFeatures

If you wish to use any of the code in your own projects, just copy the relevant module code including all author information as supplied

The VBA reference Visual Basic for Extensibility is required for certain additional functions listed in the module modDesignFeatures
e.g. CloseAllVBEWindows and for getting the procedure names in error handling code.
It can be omitted if you don't wish to use either of these

I hope this is useful to others
Do contact me if you have any questions or problems with the attached code

NOTE The attached file only runs in 32-bit Access.
See posts 3 & 6 for updated versions that work in both 32-bit and 64-bit Access
Attached Images
File Type: gif SetWindowsApp.gif (46.2 KB, 3485 views)
Attached Files
File Type: accdb SetWindows.accdb (1.74 MB, 956 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 09-22-2018 at 02:39 AM.
isladogs is offline   Reply With Quote
The Following 10 Users Say Thank You to isladogs For This Useful Post:
Alvin85 (09-16-2018), AndrewS (04-26-2018), ashleedawg (06-21-2017), dr.basit (06-27-2018), Eljefegeneo (05-04-2017), Groundrush (05-11-2017), manc74 (02-21-2018), murray83 (02-10-2018), Pat Hartman (03-24-2018), RandallAma (12-06-2017)
Old 06-21-2017, 11:08 PM   #2
ashleedawg
"Here for a good time"
 
ashleedawg's Avatar
 
Join Date: Jun 2017
Location: Canada
Posts: 152
Thanks: 19
Thanked 38 Times in 34 Posts
ashleedawg is on a distinguished road
Re: Show/hide application window, navigation pane, ribbon, taskbar

@ridders I created an account just because it was imperative for me to thank you for this post. I've been researching & experimenting for a week, trying to get some control over the Access window and such, and you have so much good stuff summed up in one place!

(I know not all the code is yours but you're the one that compiled, and made it find-able, and that's what counts!)

Thanks a bunch!
ashleedawg is offline   Reply With Quote
Old 07-15-2017, 03:25 AM   #3
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,614
Thanks: 90
Thanked 1,620 Times in 1,509 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Show/hide application window, navigation pane, ribbon, taskbar

Just had some feedback that this didn't run in 64-bit Access

I've updated the Windows API calls so that it will now also run in 64-bit Access for those of you that use it
Attached Files
File Type: accdb SetWindows.accdb (1.74 MB, 436 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following 5 Users Say Thank You to isladogs For This Useful Post:
Gasman (04-03-2018), manc74 (02-21-2018), Minty (03-23-2018), psyc0tic1 (07-18-2018), SJS66 (08-09-2017)
Old 11-02-2017, 02:16 PM   #4
Songs
Newly Registered User
 
Join Date: Nov 2017
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Songs is on a distinguished road
Re: Show/hide application window, navigation pane, ribbon, taskbar

Does anyone have any issues with using SW_HIDE to hide the application window but also having access not displayed on the task bar also?

I'm wondering if there is a way for the form to be displayed on the task bar.

Thank you in advance.
Songs is offline   Reply With Quote
Old 06-09-2018, 12:15 PM   #5
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,614
Thanks: 90
Thanked 1,620 Times in 1,509 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Show/hide application window, navigation pane, ribbon, taskbar

Post 4 has just been 'discovered' and belatedly approved.

Quote:
Does anyone have any issues with using SW_HIDE to hide the application window but also having access not displayed on the task bar also?
That's how its meant to behave
Use SetAccessWindow (SW_SHOWMINIMIZED) to hide the application window but show a taskbar icon
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Old 06-26-2018, 12:21 AM   #6
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 6,614
Thanks: 90
Thanked 1,620 Times in 1,509 Posts
isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice isladogs is just really nice
Re: Show/hide application window, navigation pane, ribbon, taskbar

Attached is an updated version with a couple of new items added to the main form.
One of these shows a way of viewing query results when the application window is hidden.
It should still work in both 32-bit & 64-bit Access.

If anyone has suggestions for other items to cover in this example, please send me a PM or email me.
Attached Files
File Type: zip SetWindows - v2.zip (327.4 KB, 171 views)

__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Web links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Previously known as ridders : Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show/Hide navigation pane via VBA? Big Pat Modules & VBA 4 07-15-2015 05:47 PM
Hide and show Ribbon and Navigation Pane OBBurton Modules & VBA 5 08-29-2014 03:53 AM
Ribbon + navigation pane lock/Hide on loading... HRakibul Modules & VBA 5 08-20-2014 12:56 AM
Setting the Ribbon Name, and Show Navigation Pane in VBA Fazered Modules & VBA 2 11-19-2008 12:20 PM




All times are GMT -8. The time now is 02:57 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World