Hiding Access Application Window Issues

tedtedted

New member
Local time
Today, 00:07
Joined
Dec 6, 2010
Messages
3
Hey All,

I have a module that runs within my Access DB, which 'hides' the Access application and only shows the forms. This works great in XP, however when it is ran within Windows 7, both the form and the Access Application minimize when you try to active the application using the task bar, and the only way you can close it is by killing the process. While I can't upload the database in question, I have quickly made a dummy database that has the same functionality for an example. Any help would be appreciated.

The file is a 2000-2003 compatible version, but I use a 2010 version on Access 2010 on the Windows 7 and XP machines
 

Attachments

have you considered using popup + modal forms to substitute for hiding the program window? hiding that window is not stable, because it will more than likely use an API.

I believe I heard Bob larson say once that doing this results in strange outcomes in some versions of windows. Seeing that he's been in the access business for awhile, I would assume that's right.

At any rate though, modal+popup can completely replace the dependency on an API, which is always less risky.
 
Something like this?
 

Attachments

  • 1.zip
    1.zip
    425.8 KB · Views: 200
Dairy Farmer:

I can make do with something like this, very simple too! Thank you very much.

One last question, I would like to have the Access Window to start in a 'modal/pop-up' window instead of the Access window being maximized. Is there a way to set the Application's Window size property? I can change the DoCmd.Maximize to DoCmd.Restore but it does not guarantee the window always being the correct size.

Edit: Nvm, didn't look at your code thoroughly...... DoCmd.MoveSize is perfect. Thanks for the help.

Edit 2: DoCmd.MoveSize doesn't seem to be working.....

Edit 3: Ok, this is what I have to do. When the user loads the program, a form runs to log them in using their active directory name. After this, I need the main form (which will be different depending on which user logs in) to open up in a 'popup/modal' way. However, I cannot set those properties because then I have the same issue with the Application window showing behind the main form. I tried using the DoCmd.MoveSize but that only seems to be applicable to Modal forms. Anyone care to shed some light on how I can achieve my goal?
 
Last edited:
see http://www.access-programmers.co.uk/forums/showthread.php?t=202399 for further developments on how to turn the Ribbon print tab back on for reports.

The Main form should not be a popup/modal. Forms that open from the main form should be popup/modal. The main form will then remain in the background.

With the MoveSize you may need to do the following:
Open the db in "design mode" (hold the shift key down when opening)
Set the Current Database properties to Overlapping Windows
Open the offending form in Design View
Set the form properties to Movable = Yes (in the format tab)
Open the form in Form View
Move the form to the correct position
Go back to Design View without closing the form
Maximise the form
In the form properties go to any event procedure/macro and edit it
Do nothing to the procedure/macro and close it
Now close the form. It should ask if you want to save it. YES
Close the db and reopen it
Does it work now?
 
Dairy Farmer:

I found a solution that works perfect to my needs, it still uses Windows API's, but in a less drastic way then my previous solution (the API's only goal is to Resize the Access Application window initially). So using this and your solution, I am completely content. Thanks for all your help.

A link to the API's I'm using as well as some examples:
smccall.demon.co.uk/Windows.htm#SizeAccess
 

Users who are viewing this thread

Back
Top Bottom