PDA

View Full Version : how to disable "show desktop"



gdmvet
04-05-2008, 04:45 AM
Does anyone know how to solve this problem :

I'd like to have my application always maximized. It doesn't have
to be on top all the time, my customers must be able to run other
programs simultaneously, but when they hit "show desktop", my
application gets minimized and the underlying window of the Access Runtime becomes visible.

So what I need is some vba code that disables :

- show desktop (either through an icon on the taskbar or through the right mouse key)
- Windows key + M
- Windows key + D

Any help would be appreciated ;)

Trevor
04-05-2008, 10:48 AM
gdmvet, I've read your post but I am unclear as to why you want to disable the (show desktop shortcut button on the taskbar), if the end user hits show desktop your app along with all others get minimized, thats the with that button. so if you want them to run other apps while your db is open, then I can't see why you want to disable show desktop button.
Do you simply just want your db form(s) to open and stay maximized?
I don't think disablin showdesktop is a smart move
the only time I would disable show desktop I would also disable the taskbar because it would be for public use at a kiosk.

gdmvet
04-06-2008, 06:00 AM
Hi Trevor,

The problem I'm facing is that, when customers click on "show desktop" while my application is running, it gets minimized. The underlying window of the access runtime becomes visible that way. That way it becomes possible to close down my application by closing down the runtime, while I want my customers to use my own shutdown key. Lots of things must happen when my application closes down (cleaning tables, unlogging stuff, etc).

Trevor
04-06-2008, 09:53 AM
ok I know what you mean now, you want to allow users to use your designed features only and when your form is minimized, they can see your table or they can see the access design window, since it is more logical that what your talking about is the design window, then when you start your project go to tools>startup, and on startup form select the form you want to appear and unceck the checkbox that says show desingn window

gdmvet
04-07-2008, 12:58 AM
I'm using Access 2007 as the frontend. In this version of Access there's always a main window in the background.

I've found some code on the internet to hide this window, but by hiding this window, the program is no longer stable, so I guess I have to live with the fact that i can't prevent people from shutting down my application using the "wrong" button :(

You can find this code here : http://mvps.org/access/api/api0019.htm (http://mvps.org/access/api/api0019.htm)

thanx for your help

Trevor
04-07-2008, 07:49 AM
ok, try this I didn't test it, but its my guess for 07
on list list view of tables/forms in the left pain, click the arrow and select grouping, or navigation, also look at database utuilities on the toolbar (sory I can't be of more help here), I havt 03
There is code in the KB to make access look like a standalone application, that wont help if you can't make a form the default form that appears when the DB is loaded

gdmvet
04-08-2008, 10:50 AM
I found a work around solution to this problem !

I tried to keep my forms always maximized. The problem I encountered was that when my customers clicked "show desktop" or Windows + D or Windows + M my form got minimized.

By putting Docmd.Maximize in the forms On Resize event the form always stays maximized and that way the close button is always obscured by my application.

Perhaps this is usefull for you too !

Trevor
04-08-2008, 03:36 PM
Thanks for posting your solution (well workaround)