Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2008
    Posts
    2

    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!

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why?
    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.

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I seriously doubt it's possible tbh. Windows is designed from the ground up to be multi-tasking. No matter what you do I believe a CTRL-ALT-DEL and End Task is going to close your application.

    Good luck though
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Mar 2008
    Posts
    2

    Healdem - here's my reason

    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.

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    My users cope with it. If they restore the window, they see that there's a size issue and then they just maximise it again.

    However, I'm sure there would be a way with Windows APIs.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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.

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    have a look through the form properties...

    close, minmax, controlbox, modal and popup will be your friends
    George
    Home | Blog

  9. #9
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    None of which will affect the application window of course, they affect the form object within Access.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  10. #10
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Ahh that is the subtlety I am missing!

    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
    George
    Home | Blog

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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".

  12. #12
    Join Date
    Nov 2008
    Posts
    2

    Disable Min/Max/Close

    Maybe it's late but ...

    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.

    I found the answer at
    http://www.techonthenet.com/access/m...hide_close.php
    and it works beautifully

  13. #13
    Join Date
    Nov 2008
    Posts
    2

    and furthermore ...

    http://www.techonthenet.com/access/m...hide_close.php

    Just to add to the above ...

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •