Unanswered: Disable XP application window Close/Max/Min/Restore properties
As soon as my custom Main Menu displays, I need to completely disable the user's ability to manually close, maximize, minimize, and/or restore the Access XP application window (not talking about the database window, rather the application window). I've seen and found code that disables just the 'Close', and many that make the application window transparent (with lots of accompanying complexities). Any code available - perhaps similar to the 'disable Close', but disabling all the controls in one fell swoop? Thanks!
I wouldn't have the temerity to tell my users what they can or cannoto do outside my applciations, and even them I'm hesitant to do that within an application, primarily becuase I don't know users will end up using an app.
users have their own way of doing things, often having multile applciations open at the same time, having multiple forms / reports within an access app. Heck as screen sizes get even bigger I see more and more forms & reports open, more an more applciations running at the same time.
so just curious why would you want to do this.
personally I suspect you may well struggle to do this as these are functions of the underlying OS not native application code. The only reason I could think offor me to attempt that is if the screen resltuon was so small they couldn't see what was going on unless they maximised and kept maximised the application.
I'm not looking to disable the application window for any program other than the database that the users are using. Instead, I want to prevent them from restoring or minimizing the MS Access database application window just for the database file they open. That's because I have other forms open, that, if the user restores the application window to a partial size, and then navigates through the database's menu system that I've built, that window size is automatically passed on to the other windows in the database. This creates form sizing problems then. So it would be a lot simpler to prevent them from restoring the application window to a partial size than it would to add more code throughout my database, at all the forms, reports and menus.
you can lock the form / report sizes withiun Access by
chaging one of the settigns in the forms properties.. forget which , but it will be a property in the form..
if you have got the forms sizes 'correct' to waht ever size you determine, you coudl over ride the event behaviour that resizes a form.
best thing to do is to look at the code window, and then look at the events in the form section.
overriding the maxmise function, setting
personally its not soemthign I've done, its not soemthing that I would even want to do, if a user came to me with that requirement I'd want to deeply investigate why it was needed.
there is no reason why maximising Access, automatically maximises / alters form sizes in Access applciations. that sounds to me as if the way you have designed your forms is the problem. unless you need a for to be maximised don't make it maximised, let it float, lock the foorm size if you wish, but don't tinker with underlying system controls.
Does Paul use a trick of having his forms Modal so the app controls don't work? I can't remember exactly. I'll bet it is in the code bank if so - maybe even in the index which would be a real result.
Otherwise no - I've done the X trick but not blocked any other app controls. If you do this you realsise that a user can't use anything else unless they know how to ALT + TAB whilst your app is open though yah?
I only ever go for minimizing the application window and setting my forms to modal and popup. Yeah, users can right click and restore the application window; but that really doesn't bother me enough to fart about with API's and rubbish.
Admittedly, a while back I did convert one of my applications to VB so I didn't have this issue on redistribution...
I have never come across a way of doing what is asked in a worthwhile manner; no matter what you do there will be ways round it and after all, the people who know the ways round only make up 1% of your users. the other 99% will be blissfully unaware
Ive never understood a reason to go down to that micro level...... if its a problem the users will soon enough realise its a problme of their making. you can't feather bed the little so and so's for ever, nor in my books have you got the time to go downt he control frekery or micro managing everything.
In my books I'd take leaf out of one of Terry Pratchetts.. a hanging aftere the first offence of theiving tends to deter the risk of committing the same offence in the future
I think the OP's point is that maximising Access makes the forms in his application look silly as they maximese aswell... looks to me that the aesthetics are coming inbetweent he content and the user. As a production orientated person, I don't care overly much about presentation, but I do care abotu content.... that doesn't mean the UI shoudl be shoddy.. just Id rather concentrate time on what the user wants as opposed to the "awe that shure looks real purdy".
I had exactly the same request as Murfi - a simple application running on a DEDICATED PC to which the public would have access. To prevent users closing the app. and having to reload each time I needed what Murfi enquired about.
Of course if you disable Close/Max/Min, you'll need a "hotspot" on an inocuous form where you can place a TRANSPARENT (and VISIBLE) command button which when clicked will quit the application - then only administrators of the app. will know how it can be closed